UPDATE Statement

Modify the values stored in a table.

Syntax:

   UPDATE [hint] [schema.]table [@dblink] [alias]
     [ WITH {READ ONLY | CHECK OPTION [CONSTRAINT constraint]} ]
         SET col_expr(s)
           [WHERE condition]
              [ RETURNING (expr,...) INTO (data_item,...) ]

   UPDATE [hint] [schema.]table [[SUB]PARTITION partition] [alias]
     [ WITH {READ ONLY | CHECK OPTION [CONSTRAINT constraint]} ]
         SET col_expr(s)
           [WHERE condition]
              [ RETURNING (expr,...) INTO (data_item,...) ]

   UPDATE [hint] [schema.]view [@dblink] [alias]
     [ WITH {READ ONLY | CHECK OPTION [CONSTRAINT constraint]} ]
         SET col_expr(s) [WHERE condition]

   UPDATE [hint] [schema.]snapshot [@dblink] [alias]
     [ WITH {READ ONLY | CHECK OPTION [CONSTRAINT constraint]} ]
         SET col_expr(s) [WHERE condition]

col_expr:
   column = expression
   column = (subquery)
   (column, column,...) = (subquery)
   VALUE (table_alias) = expression
   VALUE (table_alias) = (subquery)

To update multiple columns, separate col_expr with commas. The terms "snapshot" and "materialized view" are synonymous.

"If the shoe fits, buy it." - Imelda Marcos

Related Commands:

DELETE
EXPLAIN PLAN
INSERT

SELECT

TRUNCATE

Related Views:

  DBA_SNAPSHOTS        ALL_SNAPSHOTS        USER_SNAPSHOTS 
  DBA_ALL_TABLES       ALL_ALL_TABLES       USER_ALL_TABLES
  DBA_TABLES           ALL_TABLES           USER_TABLES         TAB
  DBA_VIEWS            ALL_VIEWS            USER_VIEWS
                                                                DICTIONARY
                                                                DICT_COLUMNS



Back to the Top

Simon Sheppard
SS64.com