Create Table

In this section you could find information about TABLES, their syntax and current convertions.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

1. 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

CREATE [ { GLOBAL | PRIVATE } TEMPORARY | SHARDED | DUPLICATED | [ IMMUTABLE ] BLOCKCHAIN 
  | IMMUTABLE  ] 
   TABLE
  [ schema. ] table
  [ SHARING = { METADATA | DATA | EXTENDED DATA | NONE } ]
  { relational_table | object_table | XMLType_table }
  [ MEMOPTIMIZE FOR READ ]
  [ MEMOPTIMIZE FOR WRITE ]
  [ PARENT [ schema. ] table ] ;

Snowflake Syntax

For more Snowflake information review the following documentation.

2. Sample Source Patterns

2.1. Physical and Table Properties

Oracle

Snowflake

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:

  • CHECK Constraint

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:

  • RELY

  • NO RELY

  • RELY ENABLE

  • RELY DISABLE

  • VALIDATE

  • NOVALIDATE

These will also be commented out.

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

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.9 Sharing and Memoptimize options

Some options in Oracle are not required in Snowflake. That is the case for the sharing and memoptimize options, they will be removed in the output code.

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

  1. Some properties on the tables may be adapted to or commented on because the behavior in Snowflake is different.

  1. SSC-EWI-0035: Check statement not supported.

  2. SSC-FDM-0006: Number type column may not behave similarly in Snowflake.

  3. SSC-FDM-0019: Sematic information could not be loaded.

  4. SSC-FDM-OR0042: Date Type Transformed To Timestamp Has A Different Behavior.

  5. SSC-FDM-OR0006: Constraint state removed from not null inline constraint.

Last updated