How to write this using the Sequel gem? :
update table set col = (select col from table where id = :x) where id = :y
I have the record with id=:y
but I want to avoid retrieving the record with id(:x)
and then doing the update. Just one step!
Do I have to use raw sql (DB.run()
)?