Jump to content

oracle - update several columns to one value


Recommended Posts

In Oracle, how do I update several columns to one value?

 

This will work, but I am guessing there is a better way.

 

Update table 
set (col1, col2, col3) = 
(select val, val, val from dual)
where record_id = :record: id

 

 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.