SnowConvert AI - Oracle - Create Table¶
In this section you could find information about TABLES, their syntax and current conversions.
설명¶
Oracle에서 CREATE TABLE 문은 사용자 데이터를 보관하는 기본 구조인 관계형 테이블 또는 열 정의에 데이터 타입을 사용하는 테이블인 오브젝트 테이블 중 한 가지 유형의 테이블을 생성하는 데 사용됩니다. (Oracle 설명서)
Oracle 구문
Snowflake 구문
참고
Snowflake에 대한 자세한 내용은 다음 설명서 를 참조하십시오.
샘플 소스 패턴¶
2.1. 물리적 및 테이블 속성¶
Oracle¶
Snowflake¶
참고
테이블 속성은 Snowflake에서 마이그레이션한 후에는 필수가 아니므로 제거됩니다.
2.2. 제약 조건 및 제약 상태¶
CHECK Constraints¶
Snowflake supports CHECK constraints with deterministic, scalar expressions. Oracle-specific state clauses (DEFERRABLE, RELY, INITIALLY, ENABLE, DISABLE) are removed during conversion with SSC-FDM-0046 annotations. CHECK constraints with unsupported expressions (UDFs, non-deterministic functions) are flagged with SSC-EWI-0116.
Supported:
Basic CHECK constraints with scalar, deterministic expressions
Column-level and table-level CHECK constraints
Named and unnamed constraints
Removed automatically (with SSC-FDM-0046):
[NOT] DEFERRABLE- Snowflake always validates immediately[NOT] RELY- Optimizer hint not supportedINITIALLY IMMEDIATE/INITIALLY DEFERREDENABLE/DISABLE- Snowflake constraints are always enforced
Unsupported (flagged with SSC-EWI-0116):
User-defined functions (UDFs)
Non-deterministic built-in functions
Context-dependent functions
Subqueries
Example 1: Basic CHECK Constraint¶
Oracle¶
Snowflake¶
Example 2: CHECK Constraint with NOT DEFERRABLE (Removed)¶
The NOT DEFERRABLE clause is removed with SSC-FDM-0046 because Snowflake always validates CHECK constraints immediately.
Oracle¶
Snowflake¶
Example 3: CHECK Constraint with RELY Clause (Removed)¶
Oracle¶
Snowflake¶
Example 4: CHECK Constraint with Unresolved Function (Unsupported)¶
When a CHECK constraint references a function that cannot be resolved, it is flagged with SSC-EWI-0116 as a user-defined function.
Oracle¶
Snowflake¶
참고
The USING INDEX constraint clause is entirely removed from the output code during the conversion.
NOT NULL Constraint States¶
In case you have any constraint state after a NOT NULL constraint as follows:
RELYNO RELYRELY ENABLERELY DISABLEVALIDATENOVALIDATE
이 또한 설명이 추가됩니다.
참고
ENABLE 제약 조건 상태는 변환 프로세스 중에 출력 코드에서 완전히 제거됩니다. DISABLE 상태의 경우 NOT NULL 제약 조건과 동시에 제거됩니다.
Oracle¶
Snowflake¶
2.3. 외래 키¶
전체 자릿수나 스케일이 없는 NUMBER 열이 있는 테이블과 앞서 언급한 NUMBER 열을 참조하는 NUMBER(*,0) 열이 있는 다른 테이블이 있는 경우, 이 외래 키를 설명합니다.
Oracle¶
Snowflake¶
2.4. 가상 열¶
Oracle¶
Snowflake¶
2.5. ID 열¶
ID 열의 경우 시퀀스가 생성되어 열에 할당됩니다.
Oracle¶
Snowflake¶
2.6. CLOB 및 BLOB 열 선언¶
CLOB 또는 BLOB 으로 선언된 열은 VARCHAR 로 변경됩니다.
Oracle¶
Snowflake¶
2.7. 제약 조건 이름¶
경고
제약 조건 이름은 Snowflake에 적용되지 않으므로 코드에서 제거되었습니다.
Oracle¶
Snowflake¶
2.8. 시간이 포함된 기본 열¶
날짜 유형으로 선언된 열은 특정 날짜 유형과 일치하도록 형 변환됩니다.
Oracle¶
Snowflake¶
2.10 AS SubQuery¶
Snowflake에서 AS SubQuery 를 통해 테이블을 생성할 때 다음 속성 및 절은 지원되지 않습니다.
Oracle¶
Snowflake¶
Known Issues¶
테이블의 일부 속성은 Snowflake의 동작이 다르기 때문에 이에 맞게 조정되거나 설명이 추가될 수 있습니다.