DB2 Tables In a database



IBM's flagship relational database management system

DB2 Tables In a database

Postby jaggz » Mon Apr 04, 2011 8:07 pm

Hi,

Would anyone know the SQL statement to list all the tables in a database.
User avatar
jaggz
 
Posts: 356
Joined: Fri Jul 23, 2010 8:51 pm
Has thanked: 8 times
Been thanked: 5 times

Re: DB2 Tables In a database

Postby Akatsukami » Mon Apr 04, 2011 8:36 pm

jaggz wrote:Hi,

Would anyone know the SQL statement to list all the tables in a database.

SELECT * FROM SYSIBM.SYSTABLES
WHERE DBNAME='database-name'
"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

Re: DB2 Tables In a database

Postby MrH » Mon Apr 04, 2011 8:59 pm

Or, after establishing a database connection: LIST TABLES FOR ALL
MrH
 


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post