您好,欢迎访问一九零五行业门户网

MySQL查询前n条记录

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条数据。

其它类似信息

推荐信息