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

Explain about rct in db2?

640


What is the function of logging in the db2 database?

645


How to check sequence on a table in db2?

600


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

1709


What type of database is db2?

525






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.

1238


What is the role of the data page in the db2 database?

589


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

650


What is bind and rebind in db2?

652


Mention the different locking levels that are available in db2.

645


How to find the number of rows in a db2 table?

644


Which components manage deadlocks in db2?

615


What is the difference between cursor stability and repeatable read isolation levels?

686


What does runstats do in db2?

607


Which isolation level provides highest data integrity?

599