Switch to: V12V11V10V9V8V7V6V5


Updates the values of one or several table fields at the chosen records.

		: UPDATE table_name SET set_clause [ , set_clause ... ]  
		  [ WHERE search_condition ]

		: column_name = < DEFAULT | NULL | expr >

The WHERE statement chooses the records which is to be updated. If WHERE is not defined, all the table records will be updated.

SET operator defines which fields could be updated and defines new values for them; and is the operation list of the assignment statements which are separated with comma from one another. In the each statement the object field which is updated is identifying and new value for this field is defined. Each object field should be mentioned in the list only once; also it shouldn’t be to assignment statements for the same object field.

UPDATE command supports linkage. It means that together with the query programmer sends the array of the records with the value representation. From the array you can refer with the help of index using syntax: :N.

Some advantages of linkage usage:

  1. you don’t waste CPU time for the unprintable characters’ allocation inside the string (escape quotes);.
  2. you don’t waste CPU time for building of string query using concatenation, instead you get the fixed query form and just update the values in the linked array.
  3. SQL parser gets string query in shorter form and thus spends less CPU time for the analyze.
  4. you can link BLOB values AS IS.

You should use NULL, to make the field blank.

	UPDATE tbl1 
	SET fldLong = 1100  
	WHERE fldLong  > 1000
	UPDATE person SET name = :1, f2 = :2
	binded WITH { "john", "NULL" }.