• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. DML Syntax Overview

DML Syntax Overview

Data Manipulation Language (DML) is used to perform operations on data in database tables, such as inserting, updating, querying, or deleting data.

Insert Data

Inserting data refers to adding one or multiple records to a database table. For details, see INSERT.

Updating Data

Modifying data refers to modifying one or multiple records in a database table. For details, see UPDATE.

Querying Data

The database query statement SELECT is used to search required information in a database. For details, see SELECT.

Deleting Data

DWS provides two statements for deleting data from database tables. To delete data meeting specified conditions from a database table, see DELETE. To delete all data from a database table, see TRUNCATE.

TRUNCATE can quickly delete all data from a database table, which achieves the effect same as that running DELETE to delete data without specifying conditions from each table. Deletion efficiency using TRUNCATE is faster because TRUNCATE does not scan tables. Therefore, TRUNCATE is useful in large tables.

Copying Data

DWS provides a statement for copying data between tables and files. For details, see COPY.

Locking a Table

DWS provides multiple lock modes to control concurrent accesses to table data. For details, see LOCK.

Invoking a Function

DWS provides three statements for invoking functions. These statements are the same in the syntax structure. For details, see CALL.