By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,167 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,167 IT Pros & Developers. It's quick & easy.

Listing DB2 Constraints

P: n/a
Tim
I have spent the last 2-3 hours trying to find a way to just list the
constraints for a given table (this includes referential - foriegn
keys, not just check constraints).

I know how to create them, but can I see them, no way. Howz it done
people, let me in on the secret.

I tried SYSIBM.SYSCHECKDEP but this doesnt show foriegn key
constraints.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Tim" <ti*******@rogers.com> wrote in message
news:60**************************@posting.google.c om...
I have spent the last 2-3 hours trying to find a way to just list the
constraints for a given table (this includes referential - foriegn
keys, not just check constraints).

I know how to create them, but can I see them, no way. Howz it done
people, let me in on the secret.

I tried SYSIBM.SYSCHECKDEP but this doesnt show foriegn key
constraints.


DB2 for OS/390 or z/OS ??
Nov 12 '05 #2

P: n/a
SYSCAT.REFERENCES contains foreign key constraints. In a UNIX environment, I
use the db2look utility with the -t option for a table. It will dump the DDL
including all check constraints and foreign keys.

Evan
"Tim" <ti*******@rogers.com> wrote in message
news:60**************************@posting.google.c om...
I have spent the last 2-3 hours trying to find a way to just list the
constraints for a given table (this includes referential - foriegn
keys, not just check constraints).

I know how to create them, but can I see them, no way. Howz it done
people, let me in on the secret.

I tried SYSIBM.SYSCHECKDEP but this doesnt show foriegn key
constraints.

Nov 12 '05 #3

P: n/a
Evan Smith <es********@hotmail.com> wrote:
SYSCAT.REFERENCES contains foreign key constraints. In a UNIX environment,
I use the db2look utility with the -t option for a table. It will dump the
DDL including all check constraints and foreign keys.

Evan
"Tim" <ti*******@rogers.com> wrote in message
news:60**************************@posting.google.c om...
I have spent the last 2-3 hours trying to find a way to just list the
constraints for a given table (this includes referential - foriegn
keys, not just check constraints).

I know how to create them, but can I see them, no way. Howz it done
people, let me in on the secret.

I tried SYSIBM.SYSCHECKDEP but this doesnt show foriegn key
constraints.


Have a look at SYSCAT.TABCONST.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.