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
Is db2 free?
What is bind in db2?
Which command is used to remove all rows from a table?
How to find the number of rows in db2 tables?
What is blu acceleration in db2?
What os does db2 run on?
Mention the different locking levels that are available in db2.
What is difference between alias and synonym in db2?
Mention the way of highlighting as well as putting a cursor to use in a cobol program.
What is db2 connect?
What is the default page size of buffer pools?
How do you concatenate the firstname and lastname from emp table to give a complete name?
What is the maximum number of columns in a db2 table?
Which component is responsible for db2 startup and shutdown?
what is the responsibility of the construction superintendent