SELECT Statement
SELECT Statement — Master the SELECT statement — the most important SQL command for retrieving data from databases. The guide walks through Basic SELECT Syntax, Filtering with WHERE, Sorting with ORDER BY, Limiting Results, Eliminating Duplicates. SELECT is used to query data from a table. The simplest form is SELECT column1, column2 FROM table_name. Use SELECT * to return all columns. Column names can be aliased with AS for clearer output. SELECT does not modify data; it only reads and returns results. WHERE clause filters rows based on conditions. Use comparison operators (=, <>, >, <, >=, <=) and logical operators (AND, OR, NOT). String comparisons use LIKE with % and _ wildcards. WHERE is evaluated before SELECT, meaning you can filter on columns not included in the output. The guide is organized into 5 sections that build on each other, each pairing a prose explanation with real SQL you can run as-is.