赞
踩
用sql语句实现取出前100条记录
Mysql:
1
SELECT * FROM tbl LIMIT 0,100;
SELECT
*
FROM
tbl LIMIT 0,100;
SQL Server:
SELECT * FROM tbl WHERE id IN (SELECT TOP 100 id FROM tbl);
tbl
WHERE
id
IN
(
TOP
100 id
tbl);
Oracle:
SELECT * FROM tbl WHERE rownum <= 100
rownum <= 100