Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/lsp4you/public_html/connect.php on line 2 LSP4YOU - Learner's Support Publications

SQL - DESCRIBE Statement

DESCRIBE statement is used to show the structure of a table:

DESCRIBE <Table Name>;

or
DESC <Table Name>;

For example:
mysql> describe department;
+-----------+-------------+------+-----+---------+-------+
| Field     | Type        | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+-------+
| dept_id   | varchar(3)  | NO   | PRI | NULL    |       |
| dept_name | varchar(30) | NO   |     | NULL    |       |
| location  | varchar(30) | YES  |     | NULL    |       |
+-----------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)

mysql>