Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2008
    Posts
    2

    Unanswered: retrieve tablename ???????

    I want a query to obtain the tablenames from the databse which contains a particular Column name... Can anyone provide a query for this

    i work in db2 and unix(IBM AIX)

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    select distinct tabschema,tabname from syscat.columns where colname = ?

    Andy

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    You can remove the DISTINCT keyword because column names are unique for each table identified by a fully qualified table name.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  4. #4
    Join Date
    Mar 2008
    Posts
    2
    Thx AR. Ur query worked.
    And thx to Stolze for his reply too

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •