Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Finding Primary key for bulk of tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Wed Dec 27, 2006 12:16 pm    Post subject: Finding Primary key for bulk of tables
Reply with quote

Hi all,

I have requirement to list primary keys for a bulk of tables and is that possible in REXX? or anyother way.

Thanks
Banu
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Dec 28, 2006 1:44 am    Post subject: Re: Finding Primary key for bulk of tables
Reply with quote

What kind of tables are you talking about?
Back to top
View user's profile Send private message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Thu Dec 28, 2006 10:27 am    Post subject: Re: Finding Primary key for bulk of tables
Reply with quote

DavidatK wrote:
What kind of tables are you talking about?


Its DB2 tables, I got an answer for it.if u know someother way please share it

the answer is

Code:
SELECT NAME
FROM
SYSIBM.SYSCOLUMNS
WHERE TBNAME = 'Table_name'
AND   TBCREATOR = 'Tb_creator '
AND   KEYSEQ > 0
ORDER BY KEYSEQ ASC
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts ERM-Diagram of SysIBM-Catalog-Tables Auryn DB2 2 Fri Feb 17, 2017 6:22 pm
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us