I am having trouble finding an equivalent SQL Server statement for the following Oracle Statement:
SELECT COL1, COL2 FROM MYTABLE WHERE ROWNUM < 10
The ROWNUM Psuedo column in Oracle would output the Row number of each row in the query and hence only the top 10 rows would be shown for this query.
I am using SQL Server 6.5
I have tried using the SELECT TOP n statement but it appears not to be supported in my version.
Is there an Equivalent to the ROWNUM column or do the later versions of SQL Server support TOP?
Thanks
Edwin Derrick
SELECT COL1, COL2 FROM MYTABLE WHERE ROWNUM < 10
The ROWNUM Psuedo column in Oracle would output the Row number of each row in the query and hence only the top 10 rows would be shown for this query.
I am using SQL Server 6.5
I have tried using the SELECT TOP n statement but it appears not to be supported in my version.
Is there an Equivalent to the ROWNUM column or do the later versions of SQL Server support TOP?
Thanks
Edwin Derrick