Skip to Content
Custom Search

Cloning a DB2 table

No replies
Anonymous

I have few tables present in a database and I have a requirement to clone these tables
in the new database. 

To be more cleare, If  I have a table Table1 in database1, I would need to have a table Table2 in database2 with all the columns and indexes defined on Table1.

I somewhere read that we have a command to actually clone an existing
table to a new table and the command would be like...

CREATE TABLE --------<new table>--- LIKE ----<old table>----------

But I do not have the full syntax. Can anyone let me know the syntax and a brief description of
how this would work?

Also would this command work in a single database or is it possible to achieve in different database?

Looking for a quick response...

Bye

"; ; ; ;
Sponsored Listing

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 24 guests online.
Dr. Radut | forum