Connecting Tech Pros Worldwide Help | Site Map

retrieve all table names from DB2

Newbie
 
Join Date: Mar 2009
Posts: 1
#1: Mar 24 '09
hi..

i want to dynamically retrieve all the table names from DB2. can anyone suggest me a procedure to do that. or is there any sample code available..??
Member
 
Join Date: Aug 2007
Posts: 51
#2: Mar 25 '09

re: retrieve all table names from DB2


Something like this is what you are after:
Expand|Select|Wrap|Line Numbers
  1. select rtrim(T.tabschema)||'.'||rtrim(T.tabname) as table_name
  2.   from syscat.tables T 
  3.   with ur
Reply