In one of my table I stored some names of students . I need to select all the names starting letter "A" or "a" .... Please help me
Thanks in advance
Simplest answer to type:
SELECT [I]whatever[/I] FROM [I]wherever[/I] WHERE [I]something[/I] LIKE 'A%' OR [I]something[/I] LIKE 'a%'; If you also care that the output be ordered:
... ORDER BY [I]something[/I]
You don't need to use 'A%' and 'a%' in WHERE. MySQL is case insensitive when comparing CARCHAR, CHAR and TEXT unless specified. So this query should be sufficient.
SELECT name FROM table WHERE name LIKE 'A%';