# Duplicating and Deleting

## Duplicating

Duplicate the entire table:

```sql
CREATE TABLE tb1_bk SELECT * FROM tb1;
```

Duplicate the column structure only (not the records):

```sql
CREATE TABLE tb1_bkc LIKE tb1;
```

Copy from another table:

```sql
INSERT INTO tb1_bkc SELECT * FROM tb1;
```

Copy a specific column:

```sql
INSERT INTO tb1_bkc (name) SELECT empid FROM tb1;
```

## Deleting

Drop a table if it exists:

```sql
DROP TABLE IF EXISTS tb1A;
```

Drop a database:

```sql
DROP DATABASE db0;
```

Delete all records from a table:

```sql
DELETE FROM tb1_bk;
```
