SnowConvert AI - Oracle - Create Table¶
In this section you could find information about TABLES, their syntax and current conversions.
Description¶
In Oracle, the CREATE TABLE statement is used to create one of the following types of tables: a relational table which is the basic structure to hold user data, or an object table which is a table that uses an object type for a column definition. (Oracle documentation)
Oracle syntax
Snowflake Syntax
Note
For more Snowflake information review the following documentation.
Sample Source Patterns¶
2.1. Physical and Table Properties¶
Oracle¶
Snowflake¶
Note
Table properties are removed because they are not required after the migration in Snowflake.
2.2. Constraints and Constraint States¶
The following constraints will be commented out:
CHECKConstraint
Note
The USING INDEX constraint will be entirely removed from the output code during the conversion.
Oracle¶
Snowflake¶
On the other hand, but in the same way, in case you have any constraint state after a NOT NULL constraint as follows:
RELYNO RELYRELY ENABLERELY DISABLEVALIDATENOVALIDATE
These will also be commented out.
Note
The ENABLE constraint state will be completely removed from the output code during the conversion process. In the case of the DISABLE state, it will also be removed concurrently with the NOT NULL constraint.
Oracle¶
Snowflake¶
2.3. Foreign Key¶
If there is a table with a NUMBER column with no precision nor scale, and another table with a NUMBER(*,0) column that references to the previously mentioned NUMBER column, we will comment out this foreign key.
Oracle¶
Snowflake¶
2.4. Virtual Column¶
Oracle¶
Snowflake¶
2.5. Identity Column¶
For identity columns, a sequence is created and assigned to the column.
Oracle¶
Snowflake¶
2.6. CLOB and BLOB column declaration¶
Columns declared as CLOB or BLOB will be changed to VARCHAR.
Oracle¶
Snowflake¶
2.7. Constraint Name¶
Warning
The constraint name is removed from the code because it is not applicable in Snowflake.
Oracle¶
Snowflake¶
2.8. Default columns with times¶
The columns declared as Date types will be cast to match with the specific date type.
Oracle¶
Snowflake¶
2.10 AS SubQuery¶
The following properties and clauses are unsupported when creating a table through AS SubQuery in Snowflake.
Oracle¶
Snowflake¶
Known Issues¶
Some properties on the tables may be adapted to or commented on because the behavior in Snowflake is different.