Ver Mensaje Individual
  #5 (permalink)  
Antiguo 16/02/2016, 05:12
alfa18
 
Fecha de Ingreso: diciembre-2007
Mensajes: 299
Antigüedad: 16 años, 4 meses
Puntos: 2
Respuesta: indices en mysql

mysql> describe t1;
+-------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------------------+------+-----+---------+----------------+
| id | smallint(5) unsigned | NO | PRI | NULL | auto_increment |
....................................
....................
..........

+-------+----------------------+------+-----+---------+----------------+
7 row in set (0.00 sec)

mysql> drop index `primary` on t1;
ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key
mysql>

No entiendo porke me da ese error ¿Me lo podeis explicar? Por supuesto, solo tengo una columna auto_increment.

Gracias, saludos:D
__________________
1os pasaos con xAMP en Windows
programando en PERL

Última edición por alfa18; 16/02/2016 a las 06:01