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

Create successful ePaper yourself

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

Data Management Language (DML) Statements4.2 Data Management Language (DML) Statements4.2.1 DELETEDeletes rows of data from a table. Both DELETE and DELETE FROM are supported. Most other options are supported,with the following exceptions:• FROM table hints• rowset functions• OPTION clause• join hints• only very simple theta joins are supported (the FROM table clause is transformed into nested subqueries)• primary table hintsThe following table_hints are parsed but ignored: FASTFIRSTROW, HOLDINDEX, INDEX(name), NOLOCK, PAGLOCK,READCOMMITTED, READPAST, READUNCOMMITTED, REPEATABLEREAD, ROWLOCK, SERIALIZABLE,SHARED, TABLOCK, TABLOCKX, UPDLOCK, XLOCK. Table hints can be optionally preceded by the WITH keyword,and, if WITH is specified, optionally enclosed in parentheses. A list of table hints can be separated by either commas orblank spaces.DELETE sets the @@ROWCOUNT system variable to the number of rows deleted, and the @@IDENTITY systemvariable to the IDENTITY value of the last row deleted.4.2.2 INSERTInserts rows of data into a table. All three MS<strong>SQL</strong> syntactic forms are supported:INSERT column VALUES list_of_valuesINSERT column SELECT select_statementINSERT column EXECUTE stored_procedureThe corresponding Sybase list_of_values and SELECT syntactic forms are supported. (Sybase does not use the VALUESkeyword.)Most options are supported, with the following exceptions:• rowset functions• DEFAULT VALUESThe following table_hints are parsed but ignored: FASTFIRSTROW, HOLDINDEX, INDEX(name), NOLOCK, PAGLOCK,READCOMMITTED, READPAST, READUNCOMMITTED, REPEATABLEREAD, ROWLOCK, SERIALIZABLE,SHARED, TABLOCK, TABLOCKX, UPDLOCK, XLOCK. Table hints can be optionally preceded by the WITH keyword,and, if WITH is specified, optionally enclosed in parentheses. A list of table hints can be separated by either commas orblank spaces.INSERT sets the @@ROWCOUNT system variable to the number of rows inserted, and the @@IDENTITY systemvariable to the IDENTITY value of the last row inserted.<strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong> 21

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

Saved successfully!

Ooh no, something went wrong!