UltraLite Database User's Guide
Dynamic SQL
Dynamic SQL statements
Use this statement to modify existing rows in database tables.
UPDATE table-name
SET set-item, ...
[ WHERE search-condition ]
UPDATE clause The UPDATE clause specifies the name of the table to be updated.
SET clause Each named column is set to the value of the expression on the right hand side of the equal sign. There are no restrictions on the expression. If the expression is a column-name, the old value is used.
WHERE clause If a WHERE clause is specified, only rows satisfying the search condition are updated. If no WHERE clause is specified, every row is updated.
Case sensitivity Character strings inserted into tables are always stored in the same case as they are entered, regardless of whether the database is case sensitive or not. A CHAR data type column updated with a string Value is always held in the database with an upper case V and the remainder of the letters lower case. SELECT statements return the string as Value. If the database is not case sensitive, however, all comparisons make Value the same as value, VALUE, and so on. Further, if a single-column primary key already contains an entry Value, an INSERT of value is rejected, as it would make the primary key not unique.
The UPDATE statement modifies values in a table.
None.
Transfer employee Philip Chin (employee 129) from the sales department to the marketing department.
UPDATE employee SET dept_id = 400 WHERE emp_id = 129