Zum Inhalt springen

Update (SQL)

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 29. November 2004 um 02:52 Uhr durch 193.193.163.178 (Diskussion). Sie kann sich erheblich von der aktuellen Version unterscheiden.

An SQL UPDATE statememt changes data in a record (or records) in a relational database system.

UPDATE statement has the following form:

UPDATE table_name SET column_name = value [WHERE criteriavariable = value]

For the UPDATE to be successfull, the user must have data manipulation privileges (UPDATE privilege) over the table or column, the updated value must not conflict with all the applicable constraints (such as primary keys, unique indexes , CHECK constraints, and NOT NULL constraints).

Example :

UPDATE phone_book SET number='+3592434343' WHERE name='Johnson, Albert J.'