DDL
Lindorm provides DDL statements for defining and managing database objects such as databases, tables, and indexes.
The following table lists the supported DDL statements, required permissions, and permission granularities.
Granting the ALL or ALL PRIVILEGES permission also grants the READ, WRITE, ADMIN, and TRASH permissions.
The following table lists only non-ALL permissions.
|
Category |
Command |
Description |
Required permissions |
Supported permission granularities |
|
Database and table schema query |
Queries the schema of a table or database. |
READ |
|
|
|
Database management |
Switches the current database. |
|
|
|
|
Creates a database and configures its properties. |
ADMIN |
GLOBAL |
||
|
Modifies the properties of a database. |
ADMIN |
GLOBAL |
||
|
Deletes a database. |
Requires both READ and ADMIN permissions |
GLOBAL |
||
|
Shows all databases in the current instance. |
|
|
||
|
Table management |
Creates a table and configures its properties. |
ADMIN |
|
|
|
Creates a new table with the same schema as an existing table. |
Requires both READ and ADMIN permissions |
DATABASE |
||
|
Modifies the schema of a table, such as adding or deleting columns, changing data types, or setting table properties. |
Requires both READ and ADMIN permissions |
DATABASE |
||
|
Deletes a table. |
Requires both ADMIN and TRASH permissions |
DATABASE |
||
|
Clears all data from a table while preserving its schema and indexes. |
Requires both ADMIN and TRASH permissions |
DATABASE |
||
|
Shows all tables in a database that match the specified conditions. |
|
|
||
|
Retrieves the |
Requires both READ and ADMIN permissions |
DATABASE |
||
|
Takes a table offline. After a table is taken offline, it cannot be read from or written to. |
ADMIN |
|
||
|
Brings a table back online. After a table is brought online, it can be read from and written to. |
ADMIN |
|
||
|
Index management |
Creates a secondary index, search index, or columnstore index, and configures index properties. |
Requires both READ and ADMIN permissions |
DATABASE |
|
|
Changes the index status or adds an index column. |
Requires both READ and ADMIN permissions |
DATABASE |
||
|
Builds a secondary index. For LindormTable versions later than 2.2.16 and up to 2.6.3, run this command to build the secondary index after submitting the index creation command. |
Requires both READ and ADMIN permissions |
DATABASE |
||
|
Deletes an index. |
Requires READ, ADMIN, and TRASH permissions |
DATABASE |
||
|
Shows the index information for a specific table, such as the index type and build progress. |
Requires both READ and ADMIN permissions |
DATABASE |
||
|
System property modification |
Modifies dynamic system configuration parameters, such as the file version number and slow query view. |
ADMIN |
GLOBAL |
|
|
System and table property view |
Shows system properties or the properties of a specific table. |
READ |
GLOBAL |
|
|
SQL query process management |
Shows currently running SQL statements and their details. |
|
|
|
|
Terminates a running SQL statement. |
|
|