1.show databases; -- 显示当前连接下的数据库
2.use db_name; -- 使用当前数据库db_name
3.show tables; -- 显示当前数据库下数据表
4.desc table_name; -- 显示table_name表的数据结构
5.show create table table_name; -- 显示table_name表的数据结构
6.select * from table_name; -- 查询table_name表的内容
7.begin; --开始事务
8.rollback; -- 回滚
9.commit; -- 提交事务
PS:rollback 回滚的意思。 就是数据库里做修改后 ( update ,insert , delete)未commit 之前 使用rollback 可以恢复数据到修改之前。