troubleshooting Question

Copy data from one table to another - tables are not the same

Avatar of Lamont77
Lamont77 asked on
Oracle Database
15 Comments1 Solution18151 ViewsLast Modified:
Hi,

Ok I have 2 tables in my oracle database - say TABLE 1 and TABLE 2.

They are exactly the same except TABLE 2 has 2 additional columns to TABLE 1.

I want to populate TABLE 2 with the data from TABLE 1.

I was trying to do it with this query:

INSERT INTO TABLE 2(SELECT * FROM TABLE 1);

However this is giving me an error: "ORA-00947: not enough values" because of the 2 additional columns in table 2.  Anyone know a way around this?
ASKER CERTIFIED SOLUTION
Ashish Patel

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros