Skip to content

Commit

Permalink
doc: update sql-features.md with IF [NOT] EXISTS for DDLs
Browse files Browse the repository at this point in the history
  • Loading branch information
kuron99 committed Dec 7, 2023
1 parent 4e72bf2 commit 7ceafa7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/sql-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ The planned features are listed [here](#planned-features).

* `CREATE TABLE <table> ...`
* see [Table definition](#table-definition)
* `DROP TABLE <table>`
* `DROP TABLE [IF EXISTS] <table>`
* `CREATE INDEX <index> ...`
* see [Index definition](#index-definition)
* `DROP INDEX <index>`
* `DROP INDEX [IF EXISTS] <index>`

----
note:
Expand All @@ -21,7 +21,10 @@ DDL should be issued from single thread when there is no on-going DML processing
### Table definition

```txt
CREATE TABLE <table-name> (<table-element> [, <table-element> [, ...]])
CREATE TABLE [<table-options>] <table-name> (<table-element> [, <table-element> [, ...]])
<table-options>:
IF NOT EXISTS
<table-element>:
<column-name> <type> [<column-constraints>]
Expand All @@ -45,7 +48,10 @@ note:
### Index definition

```txt
CREATE INDEX <index-name> ON <table-name> (<index-element> [, <index-element> [, ...]])
CREATE INDEX [<index-options>] <index-name> ON <table-name> (<index-element> [, <index-element> [, ...]])
<index-options>:
IF NOT EXISTS
<index-element>:
<column-name>
Expand Down

0 comments on commit 7ceafa7

Please sign in to comment.