13.07.2015 Views

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

T<strong>SQL</strong> CommandsThe table column constraints DEFAULT, IDENTITY, NULL, NOT NULL, PRIMARY KEY, UNIQUE, CLUSTERED,and NONCLUSTERED are supported. The table constraint FOREIGN KEY REFERENCES is supported. The CHECKcolumn constraint is not supported.The column definition DEFAULT values can include the following T<strong>SQL</strong> functions: CURRENT_TIMESTAMP, CUR-RENT_USER, GETDATE, HOST_NAME, ISNULL, NULLIF, and USER.The column definition IDENTITY constraint is supported and assigned a system-generated sequential integer. The IDENTITYarguments seed and increment are parsed, but ignored.The table constraint clauses WITH, ON, and TEXTIMAGE ON are parsed for compatibility, but are ignored.The column constraints CLUSTERED and NONCLUSTERED are parsed for compatibility, but are ignored.If the table already exists, a -201 error is issued.4.1.2 ALTER TABLEThe ALTER TABLE statement allows you to modify the definition of a table, its fields, and their data types and constraints.The following syntactical forms are supported:ALTER TABLE ADD ALTER TABLE DROP ALTER TABLE ADD COLUMN ALTER TABLE ALTER COLUMN ALTER TABLE REPLACE DEFAULT { | USER | NULL }ALTER TABLE DROP COLUMN ALTER TABLE ADD ALTER TABLE DROP ALTER TABLE ADD CONSTRAINT FOREIGN KEYALTER TABLE DROP CONSTRAINT ALTER TABLE DISABLEThe following syntax is supported for ALTER TABLE...ADD:ALTER TABLE [ WITH CHECK | WITH NOCHECK ]ADD FOREIGN KEY (col1[,col2[,...]])REFERENCES table(col1[,col2[,...]])4.1.3 DROP TABLEDeletes a table definition. You can delete a single table, or a comma-separated list of tables. You can delete both regulartables and temporary tables. (Temporary table names begin with a '#' character.) DROP TABLE ignores a nonexistenttemporary table name and completes without error.4.1.4 CREATE INDEXCreates an index for a specified table or view. T<strong>SQL</strong> partially supports CREATE INDEX with the following limitations:The following <strong>Transact</strong>-<strong>SQL</strong> features are parsed, but ignored:• The CLUSTERED/NONCLUSTERED keywords.• The ASC/DESC keywords.• The INCLUDE clause.• All WITH clause index options.18 <strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!