孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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 表名;




posted on 2012-03-28 20:54  孤独的猫  阅读(171)  评论(0编辑  收藏  举报