Thursday, December 1, 2022

Serial number in select query SQL

 select ROW_NUMBER() OVER (ORDER BY name ASC) AS SrNo,* from icms_employee e inner join  (select max(id) as maxid , Discipline from icms_employee group by Discipline ) t on  e.id = t.maxid

No comments:

Post a Comment