1.TOP子句
——用于规定要返回的记录数目
SELECT TOP number|percent column_name(s)
FROM table_name
2.Oracle语法
SELECT column_name(s) FROM table_name WHERE ROWNUM <= number
例如:
SELECT *
FROM Persons
WHERE ROWNUM <= 5
选取头两条记录:
select top 2 *
from Persons
选取50%的记录:
select 50 percent *
from persons