All Products
Search
Document Center

Lindorm:DDL

Last Updated:Aug 27, 2025

Lindorm provides Data Definition Language (DDL) statements that you can use to define and manage the schemas of objects such as databases, tables, and indexes.

The following table describes the DDL statements supported by Lindorm, along with the required permissions and supported permission granularities.

Important

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

DESCRIBE

Queries the schema of a table or database.

READ

  • GLOBAL

  • DATABASE

Database management

USE

Switches the current database.

  • READ

  • WRITE

  • ADMIN

  • GLOBAL

  • DATABASE

  • TABLE

CREATE DATABASE

Creates a database and configures its properties.

ADMIN

GLOBAL

ALTER DATABASE

Modifies the properties of a database.

ADMIN

GLOBAL

DROP DATABASE

Deletes a specific database.

Requires both READ and ADMIN permissions

GLOBAL

SHOW DATABASES

Shows all databases in the current instance.

  • READ

  • WRITE

  • ADMIN

  • GLOBAL

  • DATABASE

  • TABLE

Table management

CREATE TABLE

Creates a table and configures its properties.

ADMIN

  • GLOBAL

  • DATABASE

CREATE TABLE LIKE

Creates a new table with the same schema as an existing table.

Requires both READ and ADMIN permissions

DATABASE

ALTER TABLE

Modifies the schema of a table. For example, add a column, delete a column, modify a data type, or add table properties.

Requires both READ and ADMIN permissions

DATABASE

DROP TABLE

Deletes a specific table.

Requires both ADMIN and TRASH permissions

DATABASE

TRUNCATE TABLE

Quickly clears all data from a table but keeps its schema and indexes.

Requires both ADMIN and TRASH permissions

DATABASE

SHOW TABLES

Shows all tables in a database that meet the specified conditions.

  • READ

  • GLOBAL

  • DATABASE

SHOW CREATE TABLE

Queries the `CREATE TABLE` statement for a specific table.

Requires both READ and ADMIN permissions

DATABASE

OFFLINE TABLE

Takes a specific table offline. After a table is taken offline, it cannot be read from or written to.

ADMIN

  • GLOBAL

  • DATABASE

ONLINE TABLE

Brings a specific table online. After a table is brought online, it can be read from and written to.

ADMIN

  • GLOBAL

  • DATABASE

Index management

CREATE INDEX

Creates a secondary index, search index, or columnstore index, and configures index properties.

Requires both READ and ADMIN permissions

DATABASE

ALTER INDEX

Changes the index status or adds an index column.

Requires both READ and ADMIN permissions

DATABASE

BUILD INDEX

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

DROP INDEX

Deletes a specific index.

Requires READ, ADMIN, and TRASH permissions

DATABASE

SHOW INDEX

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

ALTER SYSTEM

Modifies dynamic system configuration parameters, such as the file version number and slow query view.

ADMIN

GLOBAL

System and table property view

SHOW VARIABLES

Shows system properties or the properties of a specific table.

READ

GLOBAL

SQL query process management

SHOW PROCESSLIST

Shows the SQL statements that are being executed and their details.

  • READ

  • WRITE

  • ADMIN

  • GLOBAL

  • DATABASE

  • TABLE

KILL QUERY

Terminates an SQL statement that is being executed.

  • READ

  • WRITE

  • ADMIN

  • GLOBAL

  • DATABASE

  • TABLE