Created
December 20, 2013 22:10
-
-
Save jonuwz/8062471 to your computer and use it in GitHub Desktop.
primary keys on a table in DB2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db2 -x "SELECT A.COLSEQ, A.COLNAME FROM SYSCAT.KEYCOLUSE A, SYSCAT.TABCONST B WHERE A.CONSTNAME=B.CONSTNAME AND B.TYPE='P' AND A.TABNAME='$TABNAME' order by A.COLSEQ" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment