说明:
N:代表多少条数据
M:代表数据库字段
Mysql:
(1)select * from test where 1=1 limit N
(2)select *from test limit N
(3)select M1,M2,M3,M4 from test limit N
sql server:
读取前10条:select top (N) * from test where 1=1
读取后10条:select top (N) * from test order by id desc
打完收工,如果疑问,欢迎提问。希望简单的语法能够帮到有疑问的编程爱好者。