2024年4月27日发(作者:)

语法

UPDATE

{

table_name WITH ( <

table_hint_limited > [ ...n ] )

| view_name

| rowset_function_limited

}

SET

{ column_name = { expression |

DEFAULT | NULL }

| @variable = expression

| @variable = column = expression

} [ ,...n ]

{ { [ FROM { < table_source > } [

,...n ] ]

[ WHERE

1 / 25

< search_condition > ] }

|

[ WHERE CURRENT OF

{ { [ GLOBAL ] cursor_name } |

cursor_variable_name }

] }

[ OPTION ( < query_hint > [

,...n ] ) ]

< table_source > ::=

table_name [ [ AS ] table_alias ] [

WITH ( < table_hint > [ ,...n ] ) ]

| view_name [ [ AS ] table_alias ]

| rowset_function [ [AS ] table_alias

]

| derived_table [ AS ] table_alias [

( column_alias [ ,...n ] ) ]

| < joined_table >

2 / 25