GITTA-Logo
PDF Version of this document Search Help

Lesson Navigation IconStructured Query Language SQL

Unit Navigation IconSQL overview

Unit Navigation IconCreation and modification of tables

Unit Navigation IconBasic database queries

Unit Navigation IconSQL Insert, Delete and Update

LO Navigation IconInserting tuples

LO Navigation IconDeleting tuples

LO Navigation IconUpdating tuples

LO Navigation IconeLSQL Exercise 'Insert, Delete und Update'

Unit Navigation IconUsage of SQL

Unit Navigation IconSummary

Unit Navigation IconRecommended Reading

Unit Navigation IconBibliography

Unit Navigation IconMetadata


GITTA/CartouCHe news:


Go to previous page Go to next page

Updating tuples

The UPDATE command is used to change one or more attribute values of existing tuples. The WHERE-clause specifies which tuples should be updated. The SET-clause specifies which attributes should be changed and their new values.

The syntax is:

UPDATE <Tablename>
SET Attributevalues
WHERE <Condition>;

Updating tuples

The assignment of the new value happens as follows:

<Attributname> = <Value>

Multiple assingments are separated by commas. The assigned value can either be a constant (absolute term) or the result of a request, i.e. there can be a request to the right of the equals sign.

If a whole row is updated, the assignment looks as follows:

ROW = ROW(<list of values>)

Top Go to previous page Go to next page