Thursday, April 23, 2009

sql query for Generate serial no



SELECT C.EmployeeId, C.FirstName,C.LastName,

(SELECT COUNT(*) FROM Employee C2 WHERE C2.EmployeeId <= C.EmployeeId

) as SrNoFROM Employee C ORDER BY EmployeeId

No comments:

ShareThis

Welcome

Welcome to Rajesh Prajapati, asp.net blog.
Here you can find some useful code and information about asp.net., c#, VB.net, SQL Server, Web Service, Web Designing etc