|
In SQL the % works as a wildcard, so '%A%' will match anything containing an A. To only match words beginning with an A use 'A%' instead.
Also, you should remove the semicolon from the query, since that will otherwise mark the end of the query and the rest (ORDER BY name ASC) will be ignored or attempted to run as a seperate query (probably ignored since your not getting any errors).
So, to sum it up, your query should look like this
SELECT * FROM names WHERE name like 'A%' ORDER BY name ASC
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
Last edited by lizciz; 08-13-2009 at 07:44 PM..
Reason: Spelling mistake
|