Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Statement Reference

UltraLite UNION statement Next Page

UltraLite UPDATE statement


Modifies existing rows in database tables.

Syntax

UPDATE table-name
SET column-name = expression, ...
[ WHERE search-condition ]

Parameters

table-name    The table-name specifies the name of the table to update. Only a single table is allowed.

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.

Only columns specified in the SET clause have their values changed. In particular, you cannot use UPDATE to set a column's value to its default.

WHERE clause    If a WHERE clause is specified, only rows satisfying search-condition are updated. See Search conditions in UltraLite.

Remarks

The UPDATE statement modifies values in a table.

Character strings inserted into tables are always stored in the same case as they are entered, regardless of whether the database is case sensitive.

See also
Example

The following example transfers employee Philip Chin from the sales department (department 129) to the marketing department (department 400).

UPDATE employee
SET dept_id = 400
WHERE emp_id = 129