Answers for "update statement for single record in oracle using multiple tables and where clause with example"

SQL
1

sql oracle update multiple rows

UPDATE employee
   SET staff_no = 
           CASE depno
                WHEN 1 THEN 'ab123'
                WHEN 2 THEN 'ab321'
                --...
                ELSE staff_no
           END
 WHERE depno IN ( 1, 2 ) -- list all cases here. use a subquery if you don't want to / cannot enumerate
Posted by: Guest on October-14-2020

Code answers related to "update statement for single record in oracle using multiple tables and where clause with example"

Code answers related to "SQL"

Browse Popular Code Answers by Language