Update Command

From rbachwiki
Revision as of 13:44, 18 October 2017 by Bacchas (talk | contribs)
Jump to navigation Jump to search

Update Command

Used to change the contents of existing rows

  • The UPDATE clause identifies the table containing the records to be changed.
  • The SET clause identifies the columns to be changed and the new values to be assigned to these columns.
  • The optional WHERE clause identifies the exact records to be changed by the UPDATE command. If the WHERE clause is omitted, the column specified in the SET clause is updated for all records in the table.
UPDATE acctmanager
SET amedate = '01-AUG-09'
WHERE amid = 'J500';

Change multiple records that match a criteria

All records that have NE and NW will be changed to W

UPDATE acctmanager 
SET region = 'W'
WHERE region IN ('NE', 'NW')


Back To Top- Home - Category