UPDATE - statement of language DB_MSSQL

Change values in the existing table record.

UPDATE table_name
SET column_name = expression | NULL | DEFAULT ] [, ...]
[ FROM table_source ]
[ WHERE search_condition ]

table_name Name of the table.
column_name Name of the column into which a new value will be entered.
expression The own value for the appropriate column determined by an expression.
table_source Name of the table that will be used for obtaining criteria of changing values.
search_condition Logical expression that determines which rows of the table are being changed (if WHERE is not stated, then it means all records).
See also:
Change the value of the column 'flags' for all records to the value 1.
UPDATE data SET flags=1
Change the value of the column 'flags' for the record that is specified by the precise time to the value 2.
UPDATE data SET flags=2 WHERE time='2003-07-02 10:02:00.227'
Change the value of the column 'flags' for the first record that meets the criterion that the 'time' value is greater than the specified time.
UPDATE data SET flags=3 FROM (SELECT TOP 1 * FROM data ORDER BY time) AS d1 WHERE data.time=d1.time
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.