mysql基本操作

1.显示数据库

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+
2 rows in set (0.00 sec)

2.选择一个数据库

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

3.查看当前库的所有表

mysql> show tables;

4.获取表结构

mysql> desc mytable1; 

5.删除库

mysql>DROP database 库名;

6.删除表

mysql>DROP table 表名;




原文地址:https://www.cnblogs.com/djcsch2001/p/2422036.html