brianlange Posted May 15, 2012 Share Posted May 15, 2012 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 comment https://forums.phpfreaks.com/topic/262575-oracle-update-several-columns-to-one-value/ Share on other sites More sharing options...
brianlange Posted May 15, 2012 Author Share Posted May 15, 2012 I'm also aware that I can write update table set col1 = val, col2 = val where id = :id I was just curious if I can avoid repeating the value. Link to comment https://forums.phpfreaks.com/topic/262575-oracle-update-several-columns-to-one-value/#findComment-1345703 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.