Developer Documentation Library > Data Model > Accessing the UNICOM Intelligence Data Model > Working with the Case Data Model > SQL syntax > Data manipulation statements > UPDATE
 
UPDATE
The UPDATE statement changes existing data in a table.
Syntax
UPDATE
  table
SET
column = expression [, column = expression... ]
[ WHERE
expression ]
Notes
The UPDATE statement does not support the FROM clause, when it is used to include information from other tables in the WHERE expression.
For information about including special characters in the text when updating a text variable, see Inserting and updating text variables.
Example
See Using the examples in this section.
This example updates respondent number 603, which you added to the table in the INSERT example. The UPDATE example gives values to the visits and entrance columns.
UPDATE vdata
SET visits = 10, entrance = {side}
WHERE serial = 603
After running the example, you can check the values using the following query:
SELECT serial AS Serial,
gender AS Gender,
museums AS Museums,
name AS Name,
visits AS Visits,
entrance AS Entrance
FROM vdata
WHERE serial > 601
Here is the result set:
Serial Gender Museums Name Visits Entrance
------ -------- ------------------------------------------------- ------------ ------ --------
602 {female} {northern_gallery} 2 {main}
603 {female} {national_museum_of_science,national_art_gallery} Tanya Smiley 10 {side}
The Visits and Entrance columns have been updated for respondent 603.
See also
INSERT
DELETE
TRUNCATE TABLE
SQL syntax
Data manipulation statements