2009-01-22 6 views

Répondre

11

voir la colonne supplémentaire dans la table COLONNES:

select * from COLUMNS where TABLE_SCHEMA='yourschema' and TABLE_NAME='yourtable' and EXTRA like '%auto_increment%' 
4

Vous pouvez utiliser

mysql> DESCRIBE yourtable; 

Exemple:

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 |    | 
+----------+--------------+------+-----+---------+----------------+ 
Questions connexes