How to Limit Query Results for Sybase Databases Using Top

The Sybase database provides the top syntax that can be used in SQL select queries to limit the records returned from a query. This is especially useful when querying very large tables in cases where the user only cares about a subset of the records. Listed below is an example of how to use the top syntax for Sybase.

Example: Returning the first 100 rows from a table called employee:

select top 100 * from employee

Many other databases also support limiting rows returned from queries. Listed below are links that show how to limit rows for other popular databases: