0

Hi friends,

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
Rajeesh

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by mwasif
1

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]

Edited by griswolf: n/a

1

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%';
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.