Originally posted by Sparr0w
SELECT First_name, Last_name, Home_phone
FROM FRIENDS
Where State="NSW"
ORDER BY Last_name Asc
Is this correct?
Asc should be ASC, and as Jeo has said, Where should be WHERE.
Also, why didn't you SELECT State as well?
Selecting first, last and (home) phone number will let the query "look up" ONLY those 3 fields, and therefore your query and criteria can only manipulate with those 3 fields, NOT the State.
So "WHERE State="NSW"" wouldn't work, because it doesn't look up the ENTIRE FRIENDS table.
Originally posted by honky tonk
I screwed up the ORDER BY part.. I wrote:
ORDER BY ASCENDING Last_Name
Hope I didn't lose too many marks..
ASC should be at the end,
It's either ASC or DESC, never "ASCENDING"
ORDER BY Last_name DESC
Ascending order = smallest to largest
Descending order = largest to smallest.
Which makes me think, whether I'm right or wrong.
I had DESC.
Ascending: A to Z, or Z to A?
Descending: Z to A, or A to Z?
I interpreted it as:
Descending, from "highest" (A) to "lowest" (Z).
Therefore it's alphabetical, by DESC.
I don't know... I'm thinking too hard about it