mysql中查询前10条记录

2014-11-24 16:43:35 · 作者: · 浏览: 0

mysql中查询前10条记录
select * from no_primary_key order by id limit 10;
# 显示从id=1到id=10的前10条记录;www.2cto.com
select * from no_primary_key limit 10; # 随意显示其中10条记录;
注意:不能用 sel 来代替 select; 但是可以用 desc 来代替 describe;
desc no_primary_key;
show create table no_primary_key; # 显示详细表结构