IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need a query to view all the tables present in the database


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Mon Sep 24, 2007 5:33 pm
Reply with quote

hi!
i have created some 20 tables i Need a query by which I can view all the tables present in the database.
can anyone help me out.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1209
Location: Bangalore,India

PostPosted: Mon Sep 24, 2007 5:55 pm
Reply with quote

Hi there,

U can use following query

Code:
SELECT NAME                 
FROM SYSIBM.SYSTABLES       
WHERE DBNAME LIKE ('CC1M%');


Here it will show name of all the tables for database CC1M.Please change database name according to ur requirement
Back to top
View user's profile Send private message
mbr_raja

New User


Joined: 15 Nov 2004
Posts: 26
Location: Chennai, India

PostPosted: Wed Sep 26, 2007 5:37 pm
Reply with quote

select * from sysibm.systables where type = 't' and database = 'first' and
tablespace = 'second';

you have to give exactly the database and tablespace while running the query.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DB2 Query to get the count of Unique ... DB2 2
No new posts Question regarding ISPF tables with T... TSO/ISPF 11
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Rexx to read current Panvalet editor/... CLIST & REXX 0
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 1
Search our Forums:


Back to Top