SQL SELECT — Query Rows from a Table
SELECT is the core DML statement that returns rows from one or more tables. The form SELECT ... FROM ... WHERE ... ORDER BY ... is identical across standard SQL, MySQL, PostgreSQL, and SQLite.
Open the interactive DevRef Hub tool →Key facts
| Standard | SELECT id, name FROM users WHERE age >= 18 ORDER BY name; |
|---|---|
| MySQL quoting | `users` (backticks) |
| PostgreSQL quoting | "users" (double quotes) |
| Alias keyword | AS (dialect differences) |
Frequently asked questions
What does SQL SELECT do?
It returns rows from one or more tables based on a query.
Is SELECT syntax the same across databases?
The core form is identical; identifier quoting and aliases differ by dialect.
Related pages
SQL SELECT is part of DevRef Hub on GOAT Lab — a free reference you can use without signing up, and it works offline. Open the tool above for any custom value.
Part of GOAT Lab — 26 free, browser-based science, engineering and developer tools. No sign-up.