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 datatypeclause is supported.Specifying the column visibility attribute by using the
VISIBLE | INVISIBLEoption 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_constraintoption is supported. For more information, see Constraints.
Ignored clauses and options
Note
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_nameoption for defining the column collation.The SORT option.
The
DEFAULT ON NULL exproption for specifying the default value. Example:CREATE TABLE T (C NUMBER DEFAULT ON NULL 1);The
identity_claimoption for defining auto-increment columns. Example:CREATE TABLE t (id NUMBER GENERATED BY DEFAULT AS IDENTITY (start with 100 increment by 10));The
ENCRYPT encryption_specoption for specifying the column encryption attribute.