examples/sqlTranslate/src/main/java/Document/CreateTable in Oracle

21 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CREATE TEMPORARY? TABLE _table ( (_column _type column_constraint), (_column _type column_constraint)* table_constraint?)
table_constraint: PRIMARY KEY
# ExampleCONSTRAINT pk_example PRIMARY KEY (column1, column2)
| UNIQUE
# ExampleCONSTRAINT uk_example UNIQUE (column1)
| FOREIGN KEY
# ExampleCONSTRAINT fk_example FOREIGN KEY (column1) REFERENCES other_table(column2)
| CHECK
# ExampleCONSTRAINT chk_example CHECK (column1 > 0)
column_constraint: NOT NULL
# Examplecolumn_name VARCHAR2(50) NOT NULL
| PRIMARY KEY
# Examplecolumn_name NUMBER(10) PRIMARY KEY
| UNIQUE
# Examplecolumn_name VARCHAR2(50) UNIQUE
| CHECK
# Examplecolumn_name NUMBER CHECK (column_name > 0)
| FOREIGN KEY
# Examplecolumn_name NUMBER(10) REFERENCES other_table(other_column)
| DEFAULT
# Examplecolumn_name VARCHAR2(50) DEFAULT 'default_value'