Migrating UPDATE Statements from Oracle to SQL Server

Because Transact-SQL supports most of the syntax used with the Oracle UPDATE statement, minimum revision is required.

Oracle SQL Server
UPDATE
{table_name | view_name | select_statement}
SET [column_name(s) = {constant_value | expression | select_statement | column_list |
variable_list]
{where_statement}
UPDATE
{table_name | view_name}
SET [column_name(s) = {constant_value | expression | select_statement | column_list |
default | variable_list]
[FROM
{table_name | view_name}[(optimizer_hints)}]

[where_statement}

The Transact-SQL UPDATE statement does not support update operations against SELECT statements. If your Oracle application code performs updates against SELECT statements, you can turn the SELECT statement into a view, and then use the view name in the Microsoft® SQL Server™ UPDATE statement.

See Also

UPDATE

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.