DDL Statements (SQL Server Compact Edition)

Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition) supports Data Definition Language (DDL) statements.

Supported DDL Statements

The following table lists the DDL statements supported by SQL Server Compact Edition.

Statement Function

CREATE DATABASE

Creates a new database and the file used to store the database.

CREATE TABLE

Creates a new table.

ALTER TABLE

Modifies a table definition by altering, adding, or dropping columns and constraints.

CREATE INDEX

Creates an index on a given table.

DROP INDEX

Removes one or more indexes from the current database.

DROP TABLE

Removes a table definition and all data, indexes, and constraints for that table.

To delimit identifiers that are keywords or do not conform to the rules for identifiers, you must use double quotation marks in SQL Server Compact Edition. Brackets are not supported.