The sort attribute not the list requested attributes
90 |
|
|
---|---|---|
|
In a WHERE clause, you define a set of criteria, and only items that match all the criteria are returned. For example:
SELECT * FROM users WHERE `last-name` = 'Smith'
SELECT * FROM users WHERE lastname = "O'Reilly"
SELECT * FROM users WHERE displayname = 'Mikki "The Great" Larkin'
These two rewritten examples are functionally identical to the preceding two.The choice of quote character has no bearing on the outcome of the Select. It is merely a mat-ter of preference or convenience.
Sort Clause
SELECT name, score FROM tests WHERE score < '75' ORDER BY score
This is the same as the prior Select example, but now the results will come back sorted on the value of the score attribute.The default sort direction is ascending if no di-rection is given.
|
---|