Andreas Vergison
Andreas Vergison

Reputation: 115

What could [ ... ] near the end of some diagrams in Snowflake's documentation stand for?

Documentation page https://docs.snowflake.com/en/sql-reference/sql/create-table.html

What could [ ... ] near the end of the following diagrams stand for?

CREATE [ OR REPLACE ] TABLE <table_name> [ ( <col_name> [ <col_type> ] , <col_name> [ <col_type> ] , ... ) ]
  [ CLUSTER BY ( <expr> [ , <expr> , ... ] ) ]
  [ COPY GRANTS ]
  AS SELECT <query>
  [ ... ]

CREATE [ OR REPLACE ] TABLE <table_name>
  [ COPY GRANTS ]
  USING TEMPLATE <query>
  [ ... ]

CREATE [ OR REPLACE ] TABLE <table_name> LIKE <source_table>
  [ CLUSTER BY ( <expr> [ , <expr> , ... ] ) ]
  [ COPY GRANTS ]
  [ ... ]

CREATE [ OR REPLACE ] TABLE <name> CLONE <source_table>
  [ { AT | BEFORE } { TIMESTAMP => <timestamp> | OFFSET => <time_difference> | STATEMENT => <id> } ]
  [ COPY GRANTS ]
  [ ... ]

The [ ... ] is not documented in https://docs.snowflake.com/en/sql-reference/conventions.html .

Upvotes: 1

Views: 57

Answers (2)

user12153737
user12153737

Reputation: 1

IIRC, [ COPY GRANTS ] is called out specifically in each of the syntax "variations" because these keywords must be ordered as presented; whereas, the ordering of other keywords or properties for the CREATE TABLE command does not matter.

Upvotes: 0

matt
matt

Reputation: 535801

That's an ellipsis. It is standard English for "and so on", here meaning "more clauses / statements could go here". It's like etcetera.

Upvotes: 3

Related Questions