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
How to Reduce Operational Complexity with Enteros Database Optimization and Cloud Financial Intelligence
- 24 May 2026
- Database Performance Management
Introduction Modern enterprises are operating in increasingly complex digital environments driven by cloud computing, artificial intelligence, real-time analytics, distributed applications, and rapidly growing data ecosystems. Organizations across industries rely heavily on cloud-native platforms and database-driven applications to support scalability, operational agility, and customer experiences. Today’s technology ecosystems support: Cloud infrastructures SaaS applications AI and machine … Continue reading “How to Reduce Operational Complexity with Enteros Database Optimization and Cloud Financial Intelligence”
How to Improve Retail Cloud Efficiency with Enteros Database Software and Infrastructure Intelligence
Introduction The retail industry is rapidly transforming as organizations accelerate digital commerce initiatives, modernize customer engagement platforms, and expand cloud-based infrastructures. Retailers today operate highly connected ecosystems involving ecommerce platforms, supply chain systems, customer analytics applications, payment processing environments, and omnichannel retail experiences. Modern retail organizations rely heavily on cloud technologies to support: Ecommerce platforms … Continue reading “How to Improve Retail Cloud Efficiency with Enteros Database Software and Infrastructure Intelligence”
How AI-Driven Database Analytics Enhances Performance and Scalability in Modern Insurance Platforms
Introduction The insurance industry is undergoing rapid digital transformation. Modern insurance platforms now support a wide range of digital services, including online policy management, automated claims processing, customer self-service portals, fraud detection systems, and AI-powered risk analysis. As customer expectations continue to evolve, insurance providers must deliver faster, more personalized, and highly reliable digital experiences. … Continue reading “How AI-Driven Database Analytics Enhances Performance and Scalability in Modern Insurance Platforms”
How to Drive Intelligent Cloud Governance with Enteros Database Management Platform and AIOps
- 22 May 2026
- Database Performance Management
Introduction Cloud computing has become the foundation of modern digital transformation. Organizations across industries increasingly rely on cloud-native infrastructures, distributed applications, AI-driven services, and real-time analytics platforms to support innovation, scalability, and operational agility. Today’s enterprises operate highly complex cloud ecosystems that support: Business-critical applications Database environments Customer engagement platforms AI and machine learning workloads … Continue reading “How to Drive Intelligent Cloud Governance with Enteros Database Management Platform and AIOps”