Data Import
CSV Loading
Data can be efficiently loaded from CSV files using several methods. The simplest is to use the CSV file's name:  
```sql
SELECT * FROM 'test.csv';
```  
Alternatively, use the [`read_csv` function](#docs:data:csv:overview) to pass along options:  
```sql
SELECT * FROM read_csv('test.csv', header = false);
```  
Or use the [`COPY` statement](#docs:sql:statements:copy::copy--from):  
```sql
COPY tbl FROM 'test.csv' (HEADER false);
```  
It is also possible to read data directly from **compressed CSV files** (e.g., compressed with [gzip](https://www.gzip.org/)):  
```sql
SELECT * FROM 'test.csv.gz';
```  
DuckDB can create a table from the loaded data using the [`CREATE TABLE ... AS SELECT` statement](#docs:sql:statements:create_table::create-table--as-select-ctas):  
```sql
CREATE TABLE test AS
SELECT * FROM 'test.csv';
```  
For more details, see the [page on CSV loading](#docs:data:csv:overview).