XAP

Data Definition Language (DDL) Syntax

DDLClosed Data Definition Language (DDL) is a subset of SQL. It is a language for describing data and its relationships in a database. DDL changes the structure of the table like creating a table, deleting a table, altering a table, etc. Example DDL commands: CREATE, ALTER, DROP, TRUNCATE. is a subset of SQL and a part of the Database Management System (DBMS). These commands are used to create of modify the tables in SQL.

GigaSpaces supports the commands of Create and Drop.

Data Definition Operations

Create Table:

This command is used to create a new table in SQL. The user has to give information like table name, column names, and their datatypes.

CREATE TABLE table_name {( [
        { column_name data_type [ column_constraint [ ... ] ]
        | table_constraint }
        [PRIMARY KEY (column)]
        [INDEX (column)]
        [PARTITION BY (column)]
        [BROADCAST]
        ] )
        |
        AS SELECT column [, column]*
        FROM table_name
        [WHERE booleanExpression]
        }

DropTable:

This command is used to remove an existing table along with its structure from the Database.

DROP TABLE [ IF EXISTS ] name

 

Describe:

DESCRIBE DATABASE databaseName
        | DESCRIBE CATALOG [ databaseName . ] catalogName
        | DESCRIBE SCHEMA [[ databaseName . ] catalogName ] . schemaName
        | DESCRIBE TABLE ] [[[ databaseName . ] catalogName ] . schemaName. ] tableName [columnName ]
        | DESCRIBE [ STATEMENT ] { query }