Skip to content

Commit

Permalink
Merge pull request #2512 from szarnyasg/cortas
Browse files Browse the repository at this point in the history
Introduce CORTAS
  • Loading branch information
szarnyasg authored Mar 17, 2024
2 parents 4103e8e + 12bdb76 commit 814fb1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/guides/sql_features/friendly_sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ DuckDB offers several advanced SQL features as well as extensions to the SQL syn
* [Auto-detecting the headers and schema of CSV files](../../data//csv/auto_detection)
* Directly querying [CSV files](../../data/csv) and [Parquet files](../../data/parquet)
* Loading from files using the syntax `FROM 'my.csv'`, `FROM 'my.csv.gz'`, `FROM 'my.parquet'`, etc.
* Filename expansion (globbing), e.g.: `FROM 'my-data/part-*.parquet'`

## Functions and Expressions

Expand Down
7 changes: 7 additions & 0 deletions docs/sql/statements/create_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ CREATE TABLE flights AS
FROM 'https://duckdb.org/data/flights.csv';
```

The CTAS construct also works with the `OR REPLACE` modifier, yielding `CREATE OR REPLACE TABLE ... AS` (CORTAS) statements:

```sql
CREATE OR REPLACE TABLE flights AS
FROM 'https://duckdb.org/data/flights.csv';
```

## Check Constraints

A `CHECK` constraint is an expression that must be satisfied by the values of every row in the table.
Expand Down

0 comments on commit 814fb1d

Please sign in to comment.