Whats the fastest way to copy table "table_1" to new table called "table_2" ?

I'd like the constraints copied as well as the data.

  • create table table_2 as select * from table_1 – OldProgrammer Feb 3 '14 at 16:39
  • @oldProgrammer but this will not copy the constrain am I right ? – sam Feb 3 '14 at 16:47
  • See here stackoverflow.com/questions/3725535/… – OldProgrammer Feb 3 '14 at 16:49
  • 1
    Dont forget to use append and parallel hints for insert and select. – Egor Skriptunoff Feb 3 '14 at 16:56
  • 1
    @Colin a don't think this is a dupe of that because the OP is specifies that table_2 is a "new table" – Jack says try topanswers.xyz Feb 28 '14 at 12:09

try alter table exchange partition, as this will not phsycaily move data but it will alter the dictionary, but keep in mind that the source table will be empty as this is exchnage

| improve this answer | |
  • 2
    would you please to give me an example or link to read about that ? – sam Aug 22 '16 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.