Category Archives: SQL

Built in SQL Function ROW_NUMBER

Today our discussion matter on built in SQL function ROW_NUMBER(). This function simply generates row number for each row in the result. e.g. Suppose we have a table Employees. SELECT EmployeeId, EmployeeName, Salary FROM Employees EmployeeId EmployeeName ————————– P0001 Emp1 P0002 Emp2 P0003 Emp3 P0004 Emp4 P0005 Emp5 ROW_NUMBER() when assign sequence number to rows […]