--- In [email protected], Arun karthikeyan wrote:
>  Emp
>  ````````````
>  Artin
>  Binda
>  Arun
>  Brinda
>  Brain lara
>  
> Out put will be .. Count of Starting letter with 'A' names 
> & count of starting letter with 'B' these should be 
> in 2 different columns

Well, you can't have them in different columns as SQL requires fixed
set of columns, but you can have them in different rows:

select substring(emp, 1, 1), count(*)
from table_name
group by substring(emp, 1, 1);

You'd get:

A 2
B 3

-- 

Milan Babuskov
http://www.guacosoft.com


Reply via email to