SELECT in T-SQL
SELECT in T-SQL: SELECT in T-SQL: an overview, SELECT Query Structure, Simple SELECT Query, Specifying Columns, Calculations in Columns, TOP and ORDER BY.
Updated
- SELECT in T-SQL: an overview (Novice): A SELECT statement asks the database a question and gets back a table of answers; T-SQL is SQL Server's version of SQL.
- SELECT Query Structure (Novice): A SELECT statement is built from clauses that always appear in the same order; this chapter uses SELECT, FROM, WHERE and ORDER BY.
- Simple SELECT Query (Novice): SELECT * FROM a table returns every column and every row, the quickest way to see what a table holds.
- Specifying Columns (Novice): List the columns you want, in the order you want them, and rename them in the result with AS.
- Calculations in Columns (Apprentice): Work out new values as you query, with arithmetic on a row's columns and joined text, and give each calculated column a name.
- TOP and ORDER BY (Novice): Sort a query's results with ORDER BY, ascending or descending, by one column or several, and keep only the first rows with TOP.