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 ibm db2 open source?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
Mention the definition of cobol in varchar field.
What is alias in db2?
What is buffer pool in the db2 database?
What is buffer pool?
Why do chiropractors use drop table?
What is the physical storage length of timestamp data type?
What are the contents of dclgen?
What is the role of the data page in the db2 database?
How do I add a column to a table in db2?
How can the duplicate values be eliminated from db2 select?
Are view updateable?
List out the data types available.
What is consistency token in db2?