Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.10-log MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
# mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| alumnos2 |
| biblioteca |
| biblioteca2 |
| biblioteca3 |
| club_video |
| dbprueba |
| ejemplos |
| empleados |
| empleados2 |
| mysql |
| performance_schema |
| proveedor2 |
| proveedores |
| sakila |
| sys |
| world |
+--------------------+
17 rows in set (0.25 sec)
# mysql> use empleados
Database changed
mysql> show tables
-> \c
mysql> use empleados
Database changed
# mysql> show tables;
+---------------------+
| Tables_in_empleados |
+---------------------+
| alumnos2 |
| deptoplaneacion |
| pet |
| salarios |
| sueldos |
+---------------------+
+---------------------+
| Tables_in_empleados |
+---------------------+
| alumnos2 |
| deptoplaneacion |
| pet |
| salarios |
| sueldos |
+---------------------+
# DROP TABLE pet ;
root@host# mysql -u root -p Enter password:******* mysql> use TUTORIALS; Database changed mysql> DROP TABLE tutorials_tbl Query OK, 0 rows affected (0.8 sec) mysql>
# mysql> DROP TABLE table_name ;
mysql> use empleados;
Database changed
mysql> show tables;
+---------------------+
| Tables_in_empleados |
+---------------------+
| alumnos2 |
| deptoplaneacion |
| pet |
| salarios |
| sueldos |
+---------------------+
5 rows in set (0.00 sec)
# mysql> drop table pet;
Query OK, 0 rows affected (0.89 sec)
# DROP TABLES nombre de la tabla;
Es muy fácil de colocar una tabla de datos existente, pero hay que tener mucho cuidado al borrar cualquier tabla existente porque los datos perdidos no se recuperarán después de eliminar una tabla.
No hay comentarios:
Publicar un comentario