I have a question regarding the following syntax. Is there a cleaner way to roll this up into one statement rather than two. I\'ve tried several iterations but this seems to b
I am looking for a less newbie way
Doing two separate update statements is (according to me) "the less newbie way" you could complicate stuff and do something like this.
update employee
set hire_date = case emp_id
when 'PMA42628M' then '1979-03-15'
when 'PSA89086M' then '1988-12-22'
end
where emp_id in ('PMA42628M', 'PSA89086M')
but what would that gain you? The entire update would run in one implicit transaction so if you want your two updates to be in a transaction you just use begin transaction .... commit
.