I want to know how to limit records in SQL Server 2000. In Oracle, I already wrote a SQL query like that.
<cfquery name="myQuery" datasource="myDSN">
SELECT * from tbl where rownum <= 10
</cfquery>
In SQL Server 2000, I cannot limit any records within a SQL query. I know I can use “maxrows” of cfquery but I don’t want CF to crawl the whole table first and limit it after all.
For SQL Server:
For MySQL (also PostgreSQL, SQLite):