This topic describes the limitations on writing SQL statements for database usage in OceanBase AI Database.
Tables with primary keys must comply with the following rules:
Each data table can have at most one primary key column set.
The primary key value cannot be NULL or an empty string.
The value of the primary key cannot be changed.
The number of primary key columns cannot exceed 64.
The total length of primary key data cannot exceed 16 KB.
When creating a VARCHAR or VARCHAR2 column, you must specify its maximum length, which must be at least 1 byte.
NUMBER is a variable-length, precise numeric data type that occupies 4 to 40 bytes of storage space. It can store zero, floating-point numbers, positive fixed-point numbers, and negative fixed-point numbers. The NUMBER type offers good data precision, strong versatility, and high portability, but its computational efficiency is relatively lower than that of floating-point types.
Reference the properties and methods of object types:
To reference object type attributes or methods in an SQL statement, you must fully qualify the reference with a table alias.
To reference an instance method that does not accept parameters, you must provide empty parentheses.
The following limitations apply when you use partition or subpartition extension for table names:
No remote tables in the name: The name of an extended partitioned table or a subpartitioned extended table cannot contain a database link or a synonym that can be resolved to a table with a database link.
No synonyms in the name: You must use the base table to specify partition or subpartition extensions, and cannot use synonyms, views, or any other objects.
In the PARTITION FOR and SUBPARTITION FOR clauses, you cannot specify the DEFAULT, MAXVALUE keywords, or bind variables for the values of partition_key_value or subpartition_key_value.
In the PARTITION and SUBPARTITION clauses, you cannot assign a bound variable to a partition or subpartition name.
You cannot perform any write operations (DML or DDL) on objects in the recycle bin; only read-only operations (SELECT) are allowed.
The SELECT...FOR UPDATE SKIP LOCKED statement is supported only for single-table queries.