Site icon 时鹏亮的Blog

MySQL常用命令-列出所有数据库,列出所有表

请知悉:本文最近一次更新为 7年 前,文中内容可能已经过时。

1、显示数据库列表。

show databases;

2、显示库中的数据表:

use mysql;
show tables;

3、显示数据表的结构:

describe 表名;

4、建库:

create database 库名;

5、建表:

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

6、删库和删表:

drop database 库名;
drop table 表名;

如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。

尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。


与《MySQL常用命令-列出所有数据库,列出所有表》相关的博文:

Exit mobile version