Misc Oracle SQL UPDATE Examples

UPDATE - Single row

Update a single row of data.

UPDATE STUDENTS
SET    
       EMPLOYEE_ID_FK       = '3789'  ,
       GENDER_CODE          = 'F'  ,
       MARITAL_STATUS_CODE  = 'M'  
WHERE  STUDENT_ID = 11  
/

COMMIT WORK ;
/

UPDATE - Update multiple rows

Update multiple rows of data..

UPDATE CLASSCONVENINGS
SET    ACITVE_FLG  = 2
WHERE 
    CLASS_CONVENE_DATE = TO_DATE('2005-12-31 00:00:00', 
    'YYYY-MM-DD HH24:MI:SS') 
/

COMMIT WORK ;
/

 Collapse All    Expand All
Custom Search

Oracle Information and Resources