This topic describes the conversion scope of CREATE TABLE DDL operations for defining regular columns during data migration from an Oracle database to an Oracle tenant of OceanBase Database.
Syntax
column_definition:
column [ datatype [ COLLATE column_collation_name ] ]
[ SORT ] [ VISIBLE | INVISIBLE ]
[ DEFAULT [ ON NULL ] expr | identity_clause ]
[ ENCRYPT encryption_spec ]
[ { inline_constraint }...
| inline_ref_constraint
]
identity_clause:
GENERATED [ ALWAYS | BY DEFAULT [ ON NULL ] ] AS IDENTITY [ ( identity_options ) ]
encryption_spec:
[ USING 'encrypt_algorithm' ][ IDENTIFIED BY password ][ 'integrity_algorithm' ][ [ NO ] SALT ]
Supported operations
Defining column types by using the
column_name datatype
clause is supported. For more information about type conversion, see Data type conversion.Specifying the column visibility attribute by using the
VISIBLE | INVISIBLE
option is supported. The default value is VISIBLE, which is not declared.Specifying the default value by using the DEFAULT expr option is supported.
Defining inline constraints by using the
inline_constraint | inline_ref_constraint
option is supported. For more information, see Constraints.
Ignored clauses and options
The following clauses and options will be ignored and will not be resolved or converted when they are specified in the synchronized DDL statements.
The
COLLATE column_collation_name
option for defining the column collation.The SORT option.
The
DEFAULT ON NULL expr
option for specifying the default value. Sample code:CREATE TABLE T (C NUMBER DEFAULT ON NULL 1);
The
identity_claim
option for defining auto-increment columns. Sample code:CREATE TABLE t (id NUMBER GENERATED BY DEFAULT AS IDENTITY (start with 100 increment by 10));
The
ENCRYPT encryption_spec
option for specifying the column encryption attribute.