Reputation: 79
I want to search for people whose name start with letter A using LIKE query but I'm getting errors. What query should I type in order to get results based on people whose name start with a particular letter or not with that letter?
Upvotes: 1
Views: 45
Reputation: 2464
Get result where name starts with a specific letter
SELECT * FROM table WHERE name LIKE 'A%'
Get result where name DOES NOT start with a specific letter
SELECT * FROM table WHERE name NOT LIKE 'A%'
Upvotes: 3