Skip to main content

DDL (Data Definition Language) Commands

These topics provide reference information for the DDL (Data Definition Language) commands in Databend.

Database & Table Management

ComponentDescription
DatabaseCreate, alter, and drop databases
TableCreate, alter, and manage tables
ViewCreate and manage virtual tables based on queries
DictionaryCreate key-value lookup tables for data enrichment

Performance & Indexing

ComponentDescription
Cluster KeyDefine data clustering for query optimization
Aggregating IndexPre-compute aggregations for faster queries
Inverted IndexFull-text search index for text columns
Ngram IndexSubstring search index for LIKE patterns
Virtual ColumnExtract and index JSON fields as virtual columns

Security & Access Control

ComponentDescription
UserCreate and manage database users
Network PolicyControl network access to databases
Mask PolicyApply data masking for sensitive information
Password PolicyEnforce password requirements and rotation

Data Integration & Processing

ComponentDescription
StageDefine storage locations for data loading
StreamCapture and process data changes
TaskSchedule and automate SQL operations
SequenceGenerate unique sequential numbers
ConnectionConfigure external data source connections
File FormatDefine formats for data import/export

Functions & Procedures

ComponentDescription
UDFCreate custom functions in Python or JavaScript
External FunctionIntegrate external APIs as SQL functions
ProcedureCreate stored procedures for complex logic
NotificationSet up event notifications and webhooks

Resource Management

ComponentDescription
WarehouseManage compute resources for query execution
Workload GroupControl resource allocation and priorities
TransactionManage database transactions
VariableSet and use session/global variables