# 创建和删除数据库
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;` 列出所有表
## 答案
```sql
drop database goods;
create database goods;
```
## 选项
### A
```sql
delete database goods;
create database goods;
```
### B
```sql
if exists(database goods) then
begin
drop database goods;
end;
create database goods;
```
### C
```sql
use goods;
drop database goods;
create database goods;
```
### D
```sql
use goods;
drop database goods;
make database goods;
```
### E
```sql
drop database goods;
make database goods;
```
### F
```sql
cd goods;
drop database goods;
create database goods;
```