Reputation: 27640
I have a question that how can we use SELECT for searching the name which start with 'A' in MySQL table? thanks
Upvotes: 8
Views: 37214
Reputation: 1074365
Using the LIKE
operator, e.g.:
SELECT lastName FROM yourTable WHERE lastName LIKE 'A%'
Upvotes: 5
Reputation: 5949
http://www.w3schools.com/SQl/sql_wildcards.asp
SELECT * FROM Persons
WHERE Name LIKE 'A%'
Upvotes: 2
Reputation: 239820
You use the LIKE
command. The %
is a wildcard.
SELECT * FROM table WHERE column like 'A%';
Upvotes: 2
Reputation: 597106
... LIKE 'A%'
(the first part of the query should be easy for you)
Upvotes: 6