Mysql lookup statement [SQL] describe table_name; this command is used to display the structure of a table + ---------- + --------- + ------ + ----- + --------- + ------- + | Field | Type | Null | Key | Default | Extra | + ---------- + ----------- + ------ + ----- + --------- + ------- + | ID | int (11) | NO | PRI | NULL | userName | char (20) | NO | NULL | password | char (20) | NO | NULL | niName | char (20) | NO | NULL | sex | char (10) | NO | NULL | phone | char (20) | YES | NULL | address | char (100) | YES | NULL | + ---------- + ----------- + ------ + ----- + --------- + ------- + + this command can achieve the same effect: show columns from table_name; show create table table_name; // display the SQL statement used when a table is created. create TABLE user | CREATE table 'user' ('id' int (11) NOT NULL, 'username' char (20) not null, 'Password' char (20) not null, 'niname' char (20) not null, 'sex' char (10) not null, 'phone' char (20) default null, 'address' char (100) default null, primary key ('id') ENGINE = InnoDB default charset = latin1