How to get Schema name for given table name



IBM's flagship relational database management system

How to get Schema name for given table name

Postby sivareddy123 » Sat Feb 14, 2015 11:33 pm

db2 query to retrieve schema names for given table name
sivareddy123
 
Posts: 3
Joined: Wed Feb 04, 2015 6:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get Schema name for given table name

Postby Akatsukami » Sun Feb 15, 2015 8:09 pm

Search column TSNAME in SYSIBM.SYSTABLES where the target table is in column NAME. Note that the schema-table relationship may be many-to-one.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post