Table of Contents

SQL - Data Definition Language (DDL)

About

DDL is a sql subset that manages the database metadata.

You can execute DDL statements with a SQL Request.

Example/HowTo

List

DDL vs the CREATE operation

With a DDL, you create a SQL Object with the CREATE statement with the create operation, you can

Execution

If you execute a SQL fetch that contains DDL statements, you will get the following results.

id          count   statement                                              error_code   error_message
--   ------------   ----------------------------------------------------   ----------   -------------
 1              0   create table ddl_table_test\n(\n    column_name inte            0
 2              0   alter table ddl_table_test\n    owner to postgres;\n            0

A DDL script is an runtime and therefore is executed:

Example of execution at runtime

tabul data print (create_ddl.sql@cd)@sqlite

Note

Auto-commit

DDL statements auto-commit, so they can't be rolled back