Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
WE have a table name (employee) & we have column name Name,ID,Age .i want to create procedure in sql & pick the data in this format my page aspx .suppose there r distinct record in my table eg .
Ashish 4 times , amit 6 times , mohit 2 & now i want to record this format

ID Name

1 Ashish (4)
2 Mohit (2)
3 Amit(6)
Posted

1 solution

you can use group by clause.
check this link
http://www.w3schools.com/sql/sql_groupby.asp[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900