you can use
mysql> DESCRIBE yourtable;
Example:
mysql> use my_database; mysql> describe users; +----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+----------------+ | user_id | int(11) | NO | PRI | NULL | auto_increment | | password | varchar(128) | NO | | NULL | | | email | varchar(128) | NO | | NULL | | +----------+--------------+------+-----+---------+----------------+
Jan Święcki
source share