Helpful Oracle hints I've found and saved

Copy Data From 1 Column To Another

Here's the answer to my question "How do I copy the data from 1 column to another?":

UPDATE yourTableName

SET columnTwoDestination = columnOneSource;

That will copy EVERY record's value from the source column (columnOneSource) to the destination column (columnTwoDestination).

If you want to only do it for specific records, just add the "WHERE" clause:

UPDATE yourTableName

SET columnTwoDestination = columnOneSource

WHERE columnThree = 'yes';

Leave a Reply

Powered by WordPress | Designed by Elegant Themes

Pin It on Pinterest

Shares
Share This