July 2010
Intermediate to advanced
840 pages
16h 33m
English
There is an order to the execution of the clauses of an SQL SELECT statement that does not seem to be covered in most beginning SQL books. It explains why some things work in SQL and others do not.
The simplest possible SELECT statement is just “SELECT * FROM Sometable;” which returns the entire table as it stands. You can actually write this as “TABLE Sometable” in Standard SQL, but nobody seems to use that syntax. Though the syntax rules say that all you need are the SELECT and FROM clauses, in practice there is almost always a WHERE clause.
Let’s look at the SELECT statement in detail. The syntax for the statement is:
SELECT [ALL | DISTINCT] <scalar expression list> FROM <table expression> ...
Read now
Unlock full access