Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / kums

you could use SYSIBM.SYSINDEXES table to know more about
the table index.

Is This Answer Correct ?    7 Yes 0 No

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

Answer / 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

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

Answer / priya shankar

If a column of the table uniquely defines each row in the
table then that column is called the Primary Key. Please
correct me if I am wrong.

Is This Answer Correct ?    9 Yes 9 No

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

Answer / 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

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

Answer / ambika

u can use sysibm.syskeys to view the primary key of a
particular table provided if u have declared any attribute
as NOT NULL. if there are multiple columns of such kind u
the above procedure wont help.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More DB2 Interview Questions

What is load utility in db2?

0 Answers  


Write a query to retrive partial string.

2 Answers  


What is coalesce in db2?

0 Answers  


how can you copy records present in a flat physical file to a database file(physical file).please explain in rpg400 with a simple example

1 Answers   CTS,


What is a db2 schema?

0 Answers  


Why do we bind in db2?

0 Answers  


what types of copies can be made with the COPY Utility ?

1 Answers  


How we create a tables in db2,what is the process/syntax to create a table with example plz?

2 Answers  


In a DB2-CICS program which is acts as co-ordinator and which is participant?

1 Answers   IBM,


What is catalog database in db2?

0 Answers  


What is alias in db2?

0 Answers  


What is host variable?

0 Answers  


Categories