Data Manipulation Language (DML) encompasses Transact-SQL statements used to manipulate database objects. SQL Server 6.0 has significantly enhanced DML in the areas shown in the following table. The DML enhancements are then described in detail.
Feature area |
Related DML statements and Transact-SQL Reference topics |
---|---|
Default and identity values | INSERT, UPDATE, DELETE statements |
Dynamically-built string execution | EXECUTE statement |
Server cursors | DELETE and UPDATE statements |
Setting variables with UPDATE | UPDATE statement, Variables |
With the addition of DEFAULT constraints and the IDENTITY property, the INSERT, UPDATE, and DELETE statements have been enhanced to allow the IDENTITYCOL, DEFAULT, and DEFAULT VALUES keywords. These keywords allow columns to be updated by referring to their "property" (DEFAULT or IDENTITY) rather than their column name. For details, see the CREATE TABLE, ALTER TABLE, DELETE, INSERT, and UPDATE statements.
With the addition of server cursors in SQL Server 6.0, the DELETE and UPDATE statements have been modified for use with cursors. If modifications to the results set of a cursor are necessary, use the WHERE CURRENT OF clause with DELETE and UPDATE. For details, see the Cursors topic and the DELETE and UPDATE statements.
The UPDATE statement has been enhanced to allow the SET clause to set local variables as well as columns. This enhances performance and lowers possible concurrency issues (because locks are held for a shorter period of time) when data verification is needed for an update. For details, see the UPDATE statement.