Mysql Select 1st Chat and Unique

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
gd77
Forum Newbie
Posts: 20
Joined: Sat Feb 26, 2011 6:11 pm

Mysql Select 1st Chat and Unique

Post by gd77 »

Hello:
Trying to Select first letter(s) (a-z) and to be unique... using Like 'a' or SUBSTRING(columnname, 1, 1) = 'a';
the main problem is to make it select from a to z as first character without repetition.
Thanks in advanced.
User avatar
gd77
Forum Newbie
Posts: 20
Joined: Sat Feb 26, 2011 6:11 pm

Re: Mysql Select 1st Chat and Unique

Post by gd77 »

Done, Fixed.
select distinct substring(col_Name,1,1) as letter from `tbl` order by letter
Post Reply