mysql show table schema code example
Example 1: mysql show table structure
DESCRIBE table_name;
Example 2: show tables mysql
SHOW TABLES;
Example 3: mysql show schema
describe [db_name.]table_name;
Example 4: show table info mysql
Copied mysql> DESCRIBE pet;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| owner | varchar(20) | YES | | NULL | |
| species | varchar(20) | YES | | NULL | |
| sex | char(1) | YES | | NULL | |
| birth | date | YES | | NULL | |
| death | date | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
Example 5: mysql show schema
show create table [db_name.]table_name;
Example 6: show tables mysql
Press CTRL+C to copy SHOW [EXTENDED] [FULL] TABLES
[{FROM | IN} db_name]
[LIKE 'pattern' | WHERE expr]