关于SQL查询前10条记录

2025-03-13 19:28:39
推荐回答(5个)
回答1:

缺少查询的参数,可以修改为:
select top 10 * from tablename
还可以按照某个字段排序的前几个:
select top 10 * from tablename order by 字段名

回答2:

select * from tablename where 你的主键名称<=10

回答3:

select top10 字段1,字段2,....from tablename
把字段名称列出来

回答4:

select top10 * from tablename 汗!

回答5:

select * from table limit 10