Is there any way to select, for example, first 10 rows of a table in T-SQL (working MSSQL)? I think I saw something in Oracle defined as rownum meta variable, used in a
You can also use rowcount, but TOP is probably better and cleaner, hence the upvote for Mehrdad
SET ROWCOUNT 10 SELECT * FROM dbo.Orders WHERE EmployeeID = 5 ORDER BY OrderDate SET ROWCOUNT 0