Procesadores

Páginas: 10 (2314 palabras) Publicado: 29 de agosto de 2012
ALTER TABLE ADD COLUMN FIRST  ANTES
mysql> show create table usuario; +---------+---------------------------------------------------------------+ | Table | Create Table | +---------+---------------------------------------------------------------+ | usuario | CREATE TABLE `usuario` ( `num_usuario` smallint(5) unsigned NOT NULL, `no_control` char(8) DEFAULT NULL, `nombre` char(40) DEFAULT NULL,`direccion` char(40) DEFAULT NULL, `ciudad` char(40) DEFAULT NULL, `telefono` char(20) DEFAULT NULL, `carrera` char(20) DEFAULT NULL, `correo` char(50) DEFAULT NULL, PRIMARY KEY (`num_usuario`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +---------+---------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> notee mysql> alter table usuario add column sexo char(40)first; Query OK, 5 rows affected (0.31 sec) Records: 5 Duplicates: 0 Warnings: 0  DESPUES mysql> show create table usuario; +---------+---------------------------------------------------------------+ | Table | Create Table | +---------+---------------------------------------------------------------+ | usuario | CREATE TABLE `usuario` ( `sexo` char(40) DEFAULT NULL, `num_usuario` smallint(5)unsigned NOT NULL, `no_control` char(8) DEFAULT NULL, `nombre` char(40) DEFAULT NULL, `direccion` char(40) DEFAULT NULL, `ciudad` char(40) DEFAULT NULL, `telefono` char(20) DEFAULT NULL, `carrera` char(20) DEFAULT NULL, `correo` char(50) DEFAULT NULL, PRIMARY KEY (`num_usuario`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +---------+---------------------------------------------------------------+ 1 row inset (0.00 sec) mysql> note

ALTER TABLE ADD COLUMN AFTER
 ANTES mysql> show create table usuario; +---------+---------------------------------------------------------------+ | Table | Create Table | +---------+---------------------------------------------------------------+ | usuario | CREATE TABLE `usuario` ( `sexo` char(40) DEFAULT NULL, `num_usuario` smallint(5) unsigned NOT NULL,`no_control` char(8) DEFAULT NULL, `nombre` char(40) DEFAULT NULL, `direccion` char(40) DEFAULT NULL, `ciudad` char(40) DEFAULT NULL, `telefono` char(20) DEFAULT NULL, `carrera` char(20) DEFAULT NULL, `correo` char(50) DEFAULT NULL, PRIMARY KEY (`num_usuario`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +---------+---------------------------------------------------------------+ 1 row in set (0.00 sec) mysql>alter table usuario add column sexo char(40) after direccion; Query OK, 5 rows affected (0.24 sec) Records: 5 Duplicates: 0 Warnings: 0  DESPUES mysql> show create table usuario; +---------+---------------------------------------------------------------+ | Table | Create Table | +---------+---------------------------------------------------------------+ | usuario | CREATE TABLE `usuario` (`num_usuario` smallint(5) unsigned NOT NULL, `no_control` char(8) DEFAULT NULL, `nombre` char(40) DEFAULT NULL, `direccion` char(40) DEFAULT NULL, `sexo` char(40) DEFAULT NULL, `ciudad` char(40) DEFAULT NULL, `telefono` char(20) DEFAULT NULL, `carrera` char(20) DEFAULT NULL, `correo` char(50) DEFAULT NULL, PRIMARY KEY (`num_usuario`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |+---------+---------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> notee

ALTER TABLE ADD COLUMN
 ANTES mysql> show create table usuario; +---------+---------------------------------------------------------------+ | Table | Create Table | +---------+---------------------------------------------------------------+ | usuario | CREATE TABLE `usuario` ( `num_usuario` smallint(5)unsigned NOT NULL, `no_control` char(8) DEFAULT NULL, `nombre` char(40) DEFAULT NULL, `direccion` char(40) DEFAULT NULL, `ciudad` char(40) DEFAULT NULL, `telefono` char(20) DEFAULT NULL, `carrera` char(20) DEFAULT NULL, `correo` char(50) DEFAULT NULL, PRIMARY KEY (`num_usuario`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 | +---------+---------------------------------------------------------------+ 1 row...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • proceso y procesador
  • Proceso Y Procesamiento
  • Procesos
  • Procesos
  • Proceso
  • Proceso
  • En proceso
  • Procesos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS