Oracle Insert from One Table to Another Table, Same Schema

I want to copy rows from one TableA, with over a million records,  to anther TableB with identical column names, both in the same Schema.  TableB is completely emply, but has several more columns, so in effect, TableA is a subset of TableB.  How do I copy rows from Table A to the empty, Table B?  Thanks.
JoalkatAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ajexpertCommented:
There you go
INSERT INTO TABLEB (col1,col2,col3) SELECT * FROM TABLEA

Open in new window

0
JoalkatAuthor Commented:
Great!  Answered my question.
0
ajexpertCommented:
Points Please :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark GeerlingsDatabase AdministratorCommented:
If performance is an issue, you may want to do a couple more things.

First: "alter tableb nologging"
Second: repeat that command for each index on tableb, for example: "alter index tableb_ix1 nologging"
Third: do the insert like this:
insert /*+APPEND */ into tableb (col1,col2,col3) SELECT * FROM TABLEA;

This may allow the insert to be *MUCH* faster.  You should do a backup though of the tablespace for tableb and for any indexes on tableb after the load, since the load will not be recoverable otherwise.
0
JoalkatAuthor Commented:
I'll shoot you the 50 points once I understand how to release.  Thanks for your patience.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.