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 db2 bind process?
What is null indicator in cobol db2?
What is the difference between cursor and select statement?
When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?
How to find the maximum value in a column in the db2 database?
Discuss about db2 bind?
What is query_cache_limit?
Explain in detail about buffer manager and its functionalities?
What is db2 plan table?
what is a corelated subquerry?
What is the difference between dbm cfg and db cfg file in db2 ?
What is buffer pool and list some of them?
What is page size in db2?
What is dpf in db2?
How do I import data from excel to db2?