Zum Inhalt springen

Update (SQL)

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 7. März 2005 um 14:09 Uhr durch Grammarbot (Diskussion | Beiträge) (Removed space before comma. I am a bot. Please revert my change if it was incorrect. I will notice automatically.). Sie kann sich erheblich von der aktuellen Version unterscheiden.

An UPDATE statement in SQL changes data in one or more records in a relational database management system.

UPDATE statement has the following form:

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

For the UPDATE to be successful, 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).

Examples

UPDATE T SET C1 = 1 WHERE C2 = 'a'