DDL Syntax Overview

Data definition language (DDL) is used to define or modify an object in a database, such as a table, index, or view.

Defining a Tablespace

A tablespace is used to manage data objects and corresponds to a catalog on a disk. For details about the involved SQL statements, see Table 5.

Table 5 SQL statements for defining a tablespace

Function

Related SQL Statements

Create a tablespace.

CREATE TABLESPACE

Defining a Table

A table is a special data structure in a database and is used to store data objects and relationships between data objects. For details about the involved SQL statements, see Table 1.

Table 1 SQL statements for defining a table

Function

Related SQL Statements

Modify table attributes.

ALTER TABLE

Define a Partitioned Table

A partitioned table is a special data structure in a database and is used to store data objects and the relationship between data objects. For details about the involved SQL statements, see Table 7.

Table 7 SQL statements for defining a partitioned table

Function

Related SQL Statements

Create a partitioned table.

CREATE TABLE PARTITION

Define an Index

An index is the sequence of values in one or more columns in a database table. It is a data structure that improves the speed of data access to specific information in a database table. For details about the involved SQL statements, see Table 2.

Table 2 SQL statements for defining an index

Function

Related SQL Statements

Define an index.

CREATE INDEX

Define a Partitioned Table

A partitioned table is a special data structure in a database and is used to store data objects and the relationship between data objects. For details about the involved SQL statements, see Table 3.

Table 3 SQL statements for defining a partitioned table

Function

Related SQL Statements

Create a partitioned table.

CREATE TABLE PARTITION

Create a partition.

ALTER TABLE PARTITION

Modify the attributes of a partitioned table.

ALTER TABLE PARTITION

Delete a partition.

ALTER TABLE PARTITION

Feedback
编组 3备份
    openGauss 2024-10-16 00:54:45
    cancel