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?

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


Please Help Members By Posting Answers For Below Questions

How to create db2 table in mainframe?

1158


Can we delete records from view?

974


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

1189


What is temporal table in db2?

1048


How does a cursor work?

994


How to rename a table in DB2 ?

1097


What is the meaning concurrency in the db2 database?

1113


What is db2 instance?

1110


Explain the benefits you can get from mainframe connect?

976


How do I copy a table in db2?

1008


What is the difference between dbm cfg and db cfg file in db2 ?

1542


Which component is responsible for db2 startup and shutdown?

1043


What is the cobol picture clause of the db2 data types date, time, timestamp?

1073


What is a plan and package in db2?

1110


How is a typical db2 batch pgm executed?

1185