To verify the table structure, use a DESCRIBE statement : Describe Table Structure « Table « MySQL Tutorial






mysql>
mysql>
mysql> CREATE TABLE myTable (
    -> id           int,
    -> first_name   VARCHAR(20),
    -> last_name    VARCHAR(20),
    -> sex          CHAR(1),
    -> start_date   DATE,
    -> end_date     DATE);
Query OK, 0 rows affected (0.05 sec)

mysql>
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| mytable        |
+----------------+
1 row in set (0.00 sec)

mysql>
mysql> describe myTable;
+------------+-------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| id         | int(11)     | YES  |     | NULL    |       |
| first_name | varchar(20) | YES  |     | NULL    |       |
| last_name  | varchar(20) | YES  |     | NULL    |       |
| sex        | char(1)     | YES  |     | NULL    |       |
| start_date | date        | YES  |     | NULL    |       |
| end_date   | date        | YES  |     | NULL    |       |
+------------+-------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

mysql>
mysql> drop table myTable;
Query OK, 0 rows affected (0.00 sec)

mysql>








4.2.Describe Table Structure
4.2.1.Check the created table by issuing a 'describe' command
4.2.2.To verify the table structure, use a DESCRIBE statement