PASOS PARA HACER UNA COPIA DE SEGURIDAD.

1-Digitar el comando "exit"

2-Comando "mysqldump -B -uroot -p nombre_bd>c:/xampp/nombre_bd.sql"


COMO BORRAR UNA BASE DE DATOS.

1- Comando "drop database nombre;"

COMO RESTAURAR LA COPIA.

1- Ingrese nuevamente a mysql y use el comando "source" seguido de la dirección de la copia de seguridad. 

COMO ELIMINAR UNA CLAVE PRIMARIA.

1-Ingresar el siguiente comando "alter table nombre de la tabla drop primary key;" 

DEFINIR NUEVAMENTE UNA CLAVE PRIMARIA.

1-Ingresar el comando "alter table nombre de la tabla modify nombre del campo varchar(x) not null primary key;" 

COMO CREAR LA TABLA RELACIONAL.

1-Comando para la tabla libro_autor, se usa enter después de las comas.

2- Comando "show tables;" para visualizar la tabla relacional creada.

3- A continuación se comprueba la estructura de la tabla.

COMO AGREGAR CAMPOS A TABLAS YA CREADAS.

1- Comando add + nombre del campo y descripción del nuevo dato. 

COMO AGREGAR CAMPOS AL PRINCIPIO DE LA TABLA.

1- Agregar un campo normalmente pero al final antes del ; agregar  "first".

COMO CAMBIAR EL NOMBRE DE UN CAMPO.

1-Comando "change" sintaxis: alter table nombre change nombre del campo;  var

© 2018 BASE DE DATOS | Todos los derechos reservados
Creado con Webnode
¡Crea tu página web gratis! Esta página web fue creada con Webnode. Crea tu propia web gratis hoy mismo! Comenzar