By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
INSERT INTO new_table (columnA) SELECT columnB FROM old_table;If you need to update a column in one table based on the values in another, then you will need to figure out which column maps rows from one table to the other. In my example below, I'll call this column the key_column. The UPDATE command can look like the following:
UPDATE new_table SET columnA = (SELECT columnB FROM old_table WHERE old_table.key_column = new_table.key_column);
Dig Deeper on Oracle and SQL
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.