Home > Database > Mysql Tutorial > mysql中查询前10条记录_MySQL

mysql中查询前10条记录_MySQL

WBOY
Release: 2016-06-01 13:38:48
Original
2171 people have browsed it

bitsCN.com


mysql中查询前10条记录

 

select * from no_primary_key order by id limit 10;

 

# 显示从id=1到id=10的前10条记录;  

 

select * from no_primary_key limit 10; # 随意显示其中10条记录; 

 

注意:不能用 sel 来代替 select; 但是可以用 desc 来代替 describe; 

 

desc no_primary_key;

 

show create table no_primary_key; # 显示详细表结构
 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template