Data Definition Language (DDL)

Contents

Data Definition Language (DDL)#

Data Definition Language (DDL) statements define and change the structure of your data — virtual databases, schemas, tables, views, indexes, functions and roles. Because Querona virtualizes data, these structures are metadata mapped over the connected sources rather than physical storage; see Materialization for when they are materialized into a backing store.

Create#

Statement

Description

CREATE DATABASE

Creates a virtual database over a connection.

CREATE SCHEMA

Creates a schema in a virtual database.

CREATE TABLE

Creates a new table in the virtual database.

CREATE VIRTUAL TABLE

Creates a metadata-only virtual table that maps to a source object without copying data.

CREATE VIEW

Creates a view in the virtual database.

CREATE INDEX

Creates an index on a view.

CREATE FUNCTION

Creates a user-defined function (UDF).

CREATE ROLE

Creates a database role.

Alter#

Statement

Description

ALTER TABLE

Adds a column or constraint to a table, or renames it.

ALTER VIEW

Changes the definition of an existing view.

ALTER INDEX

Modifies an existing index.

Drop#

Statement

Description

DROP DATABASE

Removes a virtual database.

DROP SCHEMA

Removes a schema.

DROP INDEX

Removes an index from a view.

DROP FUNCTION

Removes a user-defined function.