Preamble
MySQL FROM statement is used to display tables and any associations required for querying in MySQL.
Syntax of FROM statement in MySQL
FROM table1
[ { INNER JOIN
| LEFT [OUTER] JOIN
| RIGHT [OUTER] JOIN } table2
ON table1.column1 = table2.column1 ]
Statement parameters and arguments
- table1 and table2 are tables used in MySQL sentence. These two tables are combined based on table1.column1 = table2.column1.
Note:
- When using the FROM operator in a MySQL sentence, there should be at least one table listed in the FROM operator.
- If there are two or more tables listed in MySQL in the FROM statement, these tables are usually combined using INNER or OUTER connections, unlike the old WHERE syntax.
How to use the MySQL FROM statement
Let’s start by looking at how to use the FROM statement with only one table.
For example:
SELECT *
FROM order_details
WHERE quantity >= 100
ORDER BY DESC;
In this MySQL example, we used the FROM operator to list all columns of a table named order_details. No associations are executed because we use only one table.
Two tables with INNER JOIN
Let’s see how to use the FROM operator with two tables and an INNER JOIN.
For example:
SELECT order_details.order_id, customers.customer_name
FROM customers
INNER JOIN order_details
ON customers.customer_id = order_details.customer_id
ORDER BY order_details.order_id;
In this MySQL example, the FROM statement is used to display two tables, customers, and order_details. And we use the FROM statement to combine INNER JOIN between customers and order_details tables based on the customer_id column in both tables.
Two tables with OUTER JOIN
Let’s look at how to use the FROM operator when we combine two tables together using OUTER JOIN. In this case, we will look at the LEFT OUTER JOIN.
For example:
SELECT products.product_id, inventory.qty_on_hand
FROM products
LEFT OUTER JOIN inventory
ON products.product_id = inventory.product_id
WHERE products.product_name = 'MySQL';
In this MySQL example, the FROM operator is used to list two tables, products, and inventory. And we use the FROM statement to specify the LEFT OUTER JOIN between the product and inventory tables based on the product_id columns in both tables.
Learning MySQL; SELECT Statements
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
Cloud FinOps for Healthcare: How Enteros Database Software and AI SQL Drive RevOps Efficiency
- 19 March 2026
- Database Performance Management
Introduction The healthcare industry is undergoing a rapid digital transformation driven by electronic health records (EHRs), telemedicine, AI-powered diagnostics, patient engagement platforms, and real-time data analytics. Hospitals, healthcare providers, and life sciences organizations are increasingly relying on data-intensive applications and cloud-based infrastructure to deliver high-quality care and operational efficiency. At the heart of these systems … Continue reading “Cloud FinOps for Healthcare: How Enteros Database Software and AI SQL Drive RevOps Efficiency”
Database Optimization for Finance: How Enteros AI SQL and AIOps Enable Cloud FinOps Efficiency
Introduction The financial sector is undergoing a profound digital transformation driven by cloud adoption, real-time data processing, AI-powered analytics, and customer-centric digital services. From online banking and trading platforms to fraud detection systems and regulatory reporting engines, modern financial institutions depend heavily on high-performance database environments. As these systems scale, they introduce a dual challenge:How … Continue reading “Database Optimization for Finance: How Enteros AI SQL and AIOps Enable Cloud FinOps Efficiency”
Cost Attribution for Marketing Platforms: How Enteros AI SQL and AIOps Deliver Data Intelligence
- 18 March 2026
- Database Performance Management
Introduction The marketing sector has evolved into one of the most data-intensive domains in modern business. From digital advertising and customer segmentation to real-time personalization and omnichannel campaigns, marketing platforms today rely on complex technology ecosystems powered by massive volumes of data. Every click, impression, conversion, and interaction generates data that must be processed, analyzed, … Continue reading “Cost Attribution for Marketing Platforms: How Enteros AI SQL and AIOps Deliver Data Intelligence”
How Media Platforms Optimize Growth Management with Enteros Performance Management and Cost Attribution
Introduction The media industry has undergone a massive transformation in the past decade. From traditional broadcasting to digital-first ecosystems, media platforms now operate in a world driven by streaming services, real-time content delivery, personalized recommendations, and global audience engagement. Whether it’s video streaming, music platforms, online publishing, or digital advertising networks, modern media organizations rely … Continue reading “How Media Platforms Optimize Growth Management with Enteros Performance Management and Cost Attribution”