Using TOP with SELECT Statements
09Jun09
Hi All,
I’m back… Long time anh???… lol
The TOP option is used for limiting the output of a query result set.
– Syntax for returning n number of rows:
SELECT TOP n *
FROM table
– Example for returning 10 rows
SELECT TOP 10 *
FROM mytable
– Syntax for returning n percentage of rows:
SELECT TOP n PERCENT *
FROM table
– Example for returning 5 percent of rows
SELECT TOP 5 PERCENT *
FROM mytable
See u
Filed under: Sql | Leave a Comment
Tags: ase, mssql, option, percent, sample, Server, Sql, Sybase, T-Sql, top

No Responses Yet to “Using TOP with SELECT Statements”