How to know the primary key of a table without defining the
primary key in the table?
Answer Posted / mani
Execute:
SELECT TBCREATOR, TBNAME, NAME, KEYSEQ
FROM SYSIBM.SYSCOLUMNS
WHERE TBCREATOR = 'creater id'
AND TBNAME = 'table-name'
AND KEYSEQ > 0
ORDER BY KEYSEQ
a nonzero value for KEYSEQ indicates the place of a column in
the primary key.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is plan in cobol db2?
is it compulsory commitment control in journal?
What is db2 catalog database?
What is a bind in db2?
Which component is responsible for processing sql statements and selecting access paths?
How does a cursor work?
Highlight all the advantages that are attached to a package.
Describe major components of db2?
What is the difference between plan and package in db2?
List out the buffer pools in db2
Define db2 and its databases?
What are foreign keys in db2?
Are views updateable?
How is a typical db2 batch pgm executed?
What is the use of reorg in db2?