Extensions
Supported Operations
Below is a list of supported operations.  
#### `CREATE TABLE` {#docs:extensions:mysql::create-table}  
```sql
CREATE TABLE mysql_db.tbl (id INTEGER, name VARCHAR);
```  
#### `INSERT INTO` {#docs:extensions:mysql::insert-into}  
```sql
INSERT INTO mysql_db.tbl VALUES (42, 'DuckDB');
```  
#### `SELECT` {#docs:extensions:mysql::select}  
```sql
SELECT * FROM mysql_db.tbl;
```  
| id |  name  |
|---:|--------|
| 42 | DuckDB |  
#### `COPY` {#docs:extensions:mysql::copy}  
```sql
COPY mysql_db.tbl TO 'data.parquet';
COPY mysql_db.tbl FROM 'data.parquet';
```  
You may also create a full copy of the database using the [`COPY FROM DATABASE` statement](#docs:sql:statements:copy::copy-from-database--to):  
```sql
COPY FROM DATABASE mysql_db TO my_duckdb_db;
```  
#### `UPDATE` {#docs:extensions:mysql::update}  
```sql
UPDATE mysql_db.tbl
SET name = 'Woohoo'
WHERE id = 42;
```  
#### `DELETE` {#docs:extensions:mysql::delete}  
```sql
DELETE FROM mysql_db.tbl
WHERE id = 42;
```  
#### `ALTER TABLE` {#docs:extensions:mysql::alter-table}  
```sql
ALTER TABLE mysql_db.tbl
ADD COLUMN k INTEGER;
```  
#### `DROP TABLE` {#docs:extensions:mysql::drop-table}  
```sql
DROP TABLE mysql_db.tbl;
```  
#### `CREATE VIEW` {#docs:extensions:mysql::create-view}  
```sql
CREATE VIEW mysql_db.v1 AS SELECT 42;
```  
#### `CREATE SCHEMA` and `DROP SCHEMA` {#docs:extensions:mysql::create-schema-and-drop-schema}  
```sql
CREATE SCHEMA mysql_db.s1;
CREATE TABLE mysql_db.s1.integers (i INTEGER);
INSERT INTO mysql_db.s1.integers VALUES (42);
SELECT * FROM mysql_db.s1.integers;
```  
| i  |
|---:|
| 42 |  
```sql
DROP SCHEMA mysql_db.s1;
```  
#### Transactions {#docs:extensions:mysql::transactions}  
```sql
CREATE TABLE mysql_db.tmp (i INTEGER);
BEGIN;
INSERT INTO mysql_db.tmp VALUES (42);
SELECT * FROM mysql_db.tmp;
```  
This returns:  
| i  |
|---:|
| 42 |  
```sql
ROLLBACK;
SELECT * FROM mysql_db.tmp;
```  
This returns an empty table.  
> The DDL statements are not transactional in MySQL.