# 创建和删除数据库
Joe 在开发机上创建了一个名为 goods 的数据库,做了一些练习,现在他需要删除这个数据库,重建一个 goods。那么他需要的步骤是:
点击进入[MySQL实战练习环境](https://mydev.csdn.net/product/pod/new?image=cimg-centos7-skilltreemysql&connect=auto&create=auto&utm_source=skill){target="_blank"}。
* `show databases;` 列出所有数据库
* `show tables;` 列出所有表
## 答案
```mysql
drop database goods;
create database goods;
```
## 选项
### A
```mysql
delete database goods;
create database goods;
```
### B
```mysql
if exists(database goods) then
begin
drop database goods;
end;
create database goods;
```
### C
```mysql
use goods;
drop database goods;
create database goods;
```
### D
```mysql
use goods;
drop database goods;
make database goods;
```
### E
```mysql
drop database goods;
make database goods;
```
### F
```mysql
cd goods;
drop database goods;
create database goods;
```