Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » Mysql »

Agregar Nuevo Campo A Tabla Existente

Estas en el tema de Agregar Nuevo Campo A Tabla Existente en el foro de Mysql en Foros del Web. Hola, tengo esta tabla ya con datos y quiero agregarles un nuevo campo: esta es la tabla: CREATE TABLE paquete ( id INT NOT NULL ...
  #1 (permalink)  
Antiguo 02/07/2007, 08:55
 
Fecha de Ingreso: junio-2002
Mensajes: 38
Antigüedad: 21 años, 10 meses
Puntos: 0
Pregunta Agregar Nuevo Campo A Tabla Existente

Hola, tengo esta tabla ya con datos y quiero agregarles un nuevo campo:

esta es la tabla:

CREATE TABLE paquete
(
id INT NOT NULL AUTO_INCREMENT,
clave TEXT NOT NULL,
nombre TEXT NOT NULL,
duracion_dias INT NOT NULL,
duracion_noches INT NOT NULL,
dsalida1 INT NOT NULL,
dsalida2 INT NOT NULL,
dsalida3 INT NOT NULL,
dsalida4 INT NOT NULL,
dsalida5 INT NOT NULL,
foto1 LONGTEXT NOT NULL,
f_t_1 TEXT NOT NULL,
foto2 LONGTEXT NOT NULL,
f_t_2 TEXT NOT NULL,
foto3 LONGTEXT NOT NULL,
f_t_3 TEXT NOT NULL,
foto4 LONGTEXT NOT NULL,
f_t_4 TEXT NOT NULL,
foto5 LONGTEXT NOT NULL,
f_t_5 TEXT NOT NULL,
descripcion LONGTEXT NOT NULL,
b_descripcion LONGTEXT NOT NULL,
inclusiones LONGTEXT NOT NULL,
exclusiones LONGTEXT NOT NULL,
precio_int INT NOT NULL,
precio_des INT NOT NULL,
tipo_moneda INT NOT NULL,
porcentaje_alta INT NOT NULL,
porcentaje_baja INT NOT NULL,
itinerario LONGTEXT NOT NULL,
PRIMARY KEY(id)
);

y este es el nuevo campo que quiero agregar?:

"opciones LONGTEXT NOT NULL"

cual es el query?

SALUDOS!
  #2 (permalink)  
Antiguo 02/07/2007, 11:11
Avatar de Genetix  
Fecha de Ingreso: febrero-2002
Ubicación: Lima - Perú
Mensajes: 1.600
Antigüedad: 22 años, 2 meses
Puntos: 45
Re: Agregar Nuevo Campo A Tabla Existente

ALTER TABLE `paquete`
ADD COLUMN `opciones` LONGTEXT NOT NULL;
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:47.