Command overview
Lindorm provides a set of Data Definition Language (DDL) commands to define and manage the structure of database objects, such as databases, tables, and indexes.
The following table lists the supported DDL commands, their required permissions, and the supported permission granularities.
The ALL or ALL PRIVILEGES permission includes the READ, WRITE, ADMIN, and TRASH permissions. Granting the ALL permission also grants these four permissions.
The following table lists only permissions other than ALL.
Category | Command | Description | Permissions | Permission granularity |
Database and table schema query | Queries the schema of a table or database. | READ |
| |
Database management | Switches the current database. |
|
| |
Creates a database and sets its properties. | ADMIN | GLOBAL | ||
Modifies the properties of a database. | ADMIN | GLOBAL | ||
Deletes a specified database. | Requires the READ and ADMIN permissions. | GLOBAL | ||
Lists all databases in the current instance. |
|
| ||
Table management | Creates a table and sets its properties. | ADMIN |
| |
Creates a new table with the same structure as an existing table. | Requires the READ and ADMIN permissions. | DATABASE | ||
Modifies the structure of a table, for example, by adding or dropping columns, changing data types, or adding a table property. | Requires the READ and ADMIN permissions. | DATABASE | ||
Deletes a specified table. | Requires the ADMIN and TRASH permissions. | DATABASE | ||
Quickly removes all data from a table but preserves the table structure and indexes. | Requires the ADMIN and TRASH permissions. | DATABASE | ||
Lists all tables in a database that match the query conditions. |
|
| ||
Retrieves the CREATE TABLE statement for a specified table. | Requires the READ and ADMIN permissions. | DATABASE | ||
Takes a specified table offline. An offline table cannot be read from or written to. | ADMIN |
| ||
Brings a specified table online. An online table can be read from and written to. | ADMIN |
| ||
Index management | Creates a secondary index, search index, or columnstore index, and sets index properties. | Requires the READ and ADMIN permissions. | DATABASE | |
Changes the status of an index or adds columns to an index. | Requires the READ and ADMIN permissions. | DATABASE | ||
Builds a secondary index. For LindormTable versions later than 2.2.16 and up to 2.6.3, you must run this command to build the secondary index after creating the index. | Requires the READ and ADMIN permissions. | DATABASE | ||
Deletes a specified index. | Requires the READ, ADMIN, and TRASH permissions. | DATABASE | ||
Displays information about the indexes on a specified table, such as index type and build progress. | Requires the READ and ADMIN permissions. | DATABASE | ||
System property modification | Modifies dynamic configuration parameters, such as the file version number or the slow query view. | ADMIN | GLOBAL | |
System and table property view | Displays system properties or the properties of a specific table. | READ | GLOBAL | |
SQL query process management | Displays currently running SQL statements and their details. |
|
| |
Terminates a running SQL statement. |
|
|