Examining the Table Structure with DESCRIBE : DESCRIBE « Command MySQL « SQL / MySQL






Examining the Table Structure with DESCRIBE

        
mysql>
mysql> CREATE TABLE sales_rep(
    ->   employee_number INT,
    ->   surname VARCHAR(40),
    ->   first_name VARCHAR(30),
    ->   commission TINYINT
    -> );
Query OK, 0 rows affected (0.01 sec)

mysql>
mysql>
mysql>
mysql> DESCRIBE sales_rep;
+-----------------+-------------+------+-----+---------+-------+
| Field           | Type        | Null | Key | Default | Extra |
+-----------------+-------------+------+-----+---------+-------+
| employee_number | int(11)     | YES  |     | NULL    |       |
| surname         | varchar(40) | YES  |     | NULL    |       |
| first_name      | varchar(30) | YES  |     | NULL    |       |
| commission      | tinyint(4)  | YES  |     | NULL    |       |
+-----------------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

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

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Using DESCRIBE Statements
2.Getting Table Information