mysql 在DOS下的简单命令

来源:互联网 发布:重庆安全网络知识竞赛 编辑:程序博客网 时间:2024/04/28 11:10

 昨天一直再折腾MYSQL,今天查了命令,因为MYSQL是DOS那样的黑屏,免费的东西确实不好用哈。。。

 

下面写下简单的操作吧

 

1.显示数据库

SHOW DATABASES;

 

2.使用数据库

use 数据库名;

 

3.显示表

show tables;

 

4、建库:

create database 库名;

5、建表:

use 库名;

create table 表名 (字段设定列表);

6、删库和删表:

drop database 库名;

drop table 表名;

7、将表中记录清空:

delete from 表名;

8、显示表中的记录:

select * from 表名;

 

原创粉丝点击