modify size of the field

From: Date: Wed, 25 Oct 2000 14:43:52 +0000
Subject: modify size of the field
Groups: php.db 
Request: Send a blank email to php-db+get-3877@lists.php.net to get a copy of this message
Hi everybody. When carrying out the change of the size of the field ' nombre' obtains the following error: mysql> alter table telecen_inv modify nombre varchar(100); ERROR 1121: Column 'nombre' is used with UNIQUE or INDEX but is not defined as L mysql> How I can solve this problem. Thank you for their valuable help. Eduardo Mena Fundación Chasquinet e-mail: eduardo@chasquinet.org Quito - Ecuador mysql> describe telecen_inv; +-------------+----------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+----------------------+------+-----+---------+----------------+ | id | smallint(5) unsigned | | PRI | 0 | auto_increment | | idioma | char(1) | | | | | | nombre | varchar(50) | | MUL | | | | pais | varchar(40) | | | | | | ciudad | varchar(40) | YES | | NULL | | | direccion | varchar(60) | YES | | NULL | | | contacto | varchar(40) | | | | | | cargo | varchar(50) | YES | | NULL | | | e_mail | varchar(40) | YES | | NULL | | | url | varchar(60) | YES | | NULL | | | descripcion | text | | | NULL | | | fregistro | date | YES | | NULL | | | institucion | varchar(100) | YES | | NULL | | | telefono | varchar(50) | YES | | NULL | | | fax | varchar(50) | YES | | NULL | | | username | varchar(20) | YES | | NULL | | | password | varchar(20) | YES | | NULL | | | servicios | varchar(100) | YES | | NULL | | +-------------+----------------------+------+-----+---------+----------------+ 18 rows in set (0.00 sec) mysql> show index from telecen_inv; +-------------+------------+------------+--------------+-------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collatio| +-------------+------------+------------+--------------+-------------+---------+ | telecen_inv | 0 | PRIMARY | 1 | id | A | | telecen_inv | 1 | idx_nombre | 1 | nombre | A | +-------------+------------+------------+--------------+-------------+---------+ 2 rows in set (0.00 sec)

« previous php.db (#3877) next »