If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 list of tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Dec 2008
Posts: 1
db2 list of tables

would like to get a list of tables available in a given DB2. can some one help me ? new to databases
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 3,412
Code:
------------------------------ Commands Entered ------------------------------
list tables for all;
------------------------------------------------------------------------------
list tables for all

Table/View                      Schema          Type  Creation time
------------------------------- --------------- ----- --------------------------
EXPLAIN_ARGUMENT                DB2ADMIN        T     2008-12-18-06.49.16.419001
EXPLAIN_DIAGNOSTIC              DB2ADMIN        T     2008-12-18-06.49.19.163000

(snipped)

TABLES                          SYSSTAT         V     2008-10-13-16.49.07.231000
HMON_ATM_INFO                   SYSTOOLS        T     2008-10-13-18.34.01.362001
HMON_COLLECTION                 SYSTOOLS        T     2008-10-13-18.34.03.585001
POLICY                          SYSTOOLS        T     2008-10-13-18.33.54.913001

  393 record(s) selected.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 3,412
For another options, please see the manual.

Command Reference for Linux, UNIX, and Windows DB2 Version 9
Chapter 3. CLP Commands
LIST PACKAGES/TABLES
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,734
You can also write a select statement againt the syscat.tables view. See the SQL Reference Vol 1 Appendix for details on what is in the Catalog Tables.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
I go to Google and I type "list tables db2".... and lo behold I have my answers.... why do people still take the pains to come and register and then post such questions when it takes less time to google for it....
__________________
IBM Certified Database Associate, DB2 9 for LUW
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,721
hmm.... maybe because Google is too complicated for them?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On