top

1. Oracle数据库  
SELECT * FROM TABLE1 WHERE ROWNUM<=N
2.DB2数据库
 SELECT * ROW_NUMBER() OVER(ORDER BY COL1 DESC) AS ROWNUM WHERE ROWNUM<=N
3.MySQL数据库
 SELECT * FROM TABLE1 LIMIT N
3.SQL Server数据库

SELECT TOP N * FROM TABLE1

你可能感兴趣的:(top)