This topic describes the conversion scope of CREATE TABLE DDL operations for out-of-line constraints during data migration from an Oracle database to an Oracle tenant of OceanBase Database.
Syntax
Syntax of out_of_line_constraint:
[ CONSTRAINT constraint_name ]
{ UNIQUE (column [, column ]...)
| PRIMARY KEY (column [, column ]...)
| FOREIGN KEY (column [, column ]...) references_clause
| CHECK (condition)
} [ constraint_state ]
references_clause:
REFERENCES [ schema_name. ] object [ (column [, column ]...) ]
[ON DELETE { CASCADE | SET NULL } ]
constraint_state:
[ [NOT] DEFERRABLE [INITIALLY {IMMEDIATE | DEFERRED}] ]
| INITIALLY { IMMEDIATE | DEFERRED } [ NOT ] [ DEFERRABLE ]
]
[ RELY | NORELY ]
[ using_index_clause ]
[ ENABLE | DISABLE ]
[ VALIDATE | NOVALIDATE ]
[ exceptions_clause ]
Supported operations
Defining constraint names by using the
CONSTRAINT constraint_nameclause is supported.Defining the UNIQUE and PRIMARY KEY constraints by using the
UNIQUE (column [, column ]...)andPRIMARY KEY (column [, column ]...)clauses is supported.Defining the CHECK constraint is supported.
Defining the FOREIGN KEY constraint by using the
FOREIGN KEY (column [, column ]...) references_clauseclause is supported, and filters can be set.Specifying the
ENABLE/DISABLE,VALIDATE/NOVALIDATE, andRELY/NORELYoptions in theconstraint_stateclause for CHECK constraints is supported. Other options will be ignored.
Unsupported operations
Specifying the ENABLE, DISABLE, VALIDATE, NOVALIDATE, RELY, and NORELY options in the constraint_state clause for constraints other than CHECK constraints is not supported. These options will be ignored when they are specified for other constraints.