Reference

FROM

Pick the source the query reads rows from: a table, a view, a subquery, or a CTE. Multiple comma-separated sources in FROM are an implicit cross join, which almost always signals a missing join condition.

Syntax #

sql
SELECT *
FROM table_name AS alias;

Example #

Loading SQL editor...
Warning

Comma-separated tables in FROM hide the join intent. FROM orders, users WHERE orders.user_id = users.id works but reads as two separate steps (source list + filter). Drop the WHERE by accident and you get a silent cartesian product. Always use explicit JOIN ... ON so malformed joins fail loudly instead of running very slowly.