CREATE TABLE ABC.table like XYZ.table question

Georg Peter

CREATE TABLE ABC.table like XYZ.table question
DB2 for z/OS v7

Fellow Collegues,

I have to "clone" 172 tables, 298 views and about 224 indexes for an
"extra-copy" of an existing application.

The worst thing is that I do not have a cloning tool. And I do not have
the complete DDL especially for the 172 CREATE TABLE's.

When I run "CREATE TABLE ABC.table like XYZ.table..." I will get an
exact copy of the table XYZ.table - correct ?

But what happens with the primary key of this table ? Will this primary
key build also automatically ? Or do I have to ALTER the table (= adding
a PK) later ?

Some good ideas for me ?

Thanks in advance for any advice you may be able to provide.

With kind regards - mit freundlichen Gruessen,
G e o r g H . P e t e r
Datenzentrale Baden-Wuerttemberg
Development and Product Support (E3)
Krailenshaldenstrasse 44, 70469 Stuttgart, Germany, Europe
e:mail [login to unmask email]
Phone 0049-711-8108-271
PC-Fax 004971189696071
Internet (only in german language):
>"Next time you think you're perfect - try walk on water!"<

Abonnieren Sie den monatlichen Infobrief der Datenzentrale Baden-Wurttemberg und erfahren Sie regelma?ig die neuesten Nachrichten uber aktuelle Projekte und Entwicklungen. Melden Sie sich an mit diesem Link

Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at