mysql常用的一些命令和常见的错误。

创建数据库: create 数据库名字;

显示所有的数据库:show databases; (记得后面的分号不能少)。

切换到对应的数据库:use 数据库名字  

创建表如下:

create table tutorials_tbl(
   tutorial_title VARCHAR(100),
   tutorial_author VARCHAR(40)  
);

查看所以表:show tables;

查看表格的描述:describe 表名;

查看表格详细内容: select * from 表名;

删除数据库和删除表: drop database 数据库名; drop table 表名;

猜你喜欢

转载自blog.csdn.net/weixin_39770778/article/details/82984902