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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.