Comentários (4)

1 brunoalsantos comentou às Link permanente

Hello Noberto,

 
We can also do this, extract the informations from db2look command.
 
Cheers
Bruno.

2 Norberto comentou às Link permanente

You're right Bruno, but there are situations where you just cannot use db2look (e.g.: a programmer that only connects to the database through JDBC, without the DB2 CLP).
Also, db2look won't produce the DROP commands.

 
I really prefer this approach because with it I can have all FKs for an schema, for example, and in a really easy way (just execute the SELECT, without having to search for thousands of lines in the db2look's outputs).
 
Thanks for your comment.

3 dickr comentou às Link permanente

Never realized that. The "-dp" option with db2look will drop the whole table, so the drop FK-constraints are not required because they are gone already.

 
That Norberto guy is smart :)

4 Norberto comentou às Link permanente

Good point Dick, thanks for that :-)