您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

MySQL查询前n条记录

2025/11/7 15:04:32发布44次查看
sql server 中使用top查询前n行数据,语法规则为: select top number|percent column_name(s) from table_name 而在mysql中使用
sql server 中使用top查询前n行数据,语法规则为:
select top number|percent column_name(s) from table_name
而在mysql中使用的是limit:
select column_name(s) from table_name limit number 
例子:
select * from keywordtable limit 0,4;
select * from keywordtable limit 1,4;
在第一条语句中0可以省略,默认是从第一条开始。第二条语句查询 的是2、3、4条数据。

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product