Home >Database >Mysql Tutorial >How to query the first 20 records in mysql
Mysql method to query the first 20 records: 1. Execute the [select * from no_primary_key order by id limit 10;] command to view; 2. Execute the [show create table...] command to view the table structure.
The operating environment of this article: Windows7 system, Dell G3 computer, mysql8.
Specific method:
If you want to display the first 20 records from id=1 to id=20, execute the command:
select * from no_primary_key order by id limit 10;
Display 20 of the records at will
select * from no_primary_key limit 20;
Note: sel cannot be used instead of select; but desc can be used instead of describe;
desc no_primary_key; show create table no_primary_key; # 显示详细表结构
(Video tutorial recommendation: mysql video tutorial)
The above is the detailed content of How to query the first 20 records in mysql. For more information, please follow other related articles on the PHP Chinese website!