Data Definition Language (DDL)

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.

CREATE CREDENTIAL

Creates a server-level credential (identity + optional secret) shared by all databases on the cluster.

CREATE DATABASE SCOPED CREDENTIAL

Creates a database scoped credential (identity + optional secret) in the current virtual database.

CREATE MASTER KEY

Accepted for SQL Server compatibility; a no-op — no master key is persisted.

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.

ALTER CREDENTIAL

Resets a server-level credential’s identity and secret.

ALTER DATABASE SCOPED CREDENTIAL

Resets a database scoped credential’s identity and secret.

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.

DROP CREDENTIAL

Removes a server-level credential from the server.

DROP DATABASE SCOPED CREDENTIAL

Removes a database scoped credential from the current virtual database.

DROP MASTER KEY

Accepted for SQL Server compatibility; a no-op.

Sensitivity classification#

Statement

Description

SENSITIVITY CLASSIFICATION

Adds or removes a data-sensitivity classification (label and information type) on table columns.