How to know the primary key of a table without defining the
primary key in the table?

Answer Posted / nkv

Use the table name in SYSINDEXES to get the Primary index
name. The Primary index will have the value ‘P’ against
UNIQUERULE column in this table. Use this index name in
SYSKEYS table to get the column(s) in Primary key.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you stop a db2 database in linux?

570


What are db2 tables?

651


What is dclgen (declaration generator)?

605


Can there be more than one cursor open for any program?

664


What is data manager?

612






What is the use of commit in db2?

636


How to take backup of table in db2?

601


What os does db2 run on?

574


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.

1242


How to retrieve rows from a db2 table in embedded sql?

732


What is a db2 table?

597


Explain about rct.

654


What are the bind parameters ibm db2?

624


What is dbrm? What it contains?

684


Comment whether the cursor is closed during commit or not.

676