Results 1 to 2 of 2

Thread: User tables

  1. #1
    Join Date
    May 2004
    Posts
    2

    Unanswered: User tables

    Hello all, I am very new to DB2 having almost all my experience in Oracle. I am currently writting a java GUI to connect to both an Oracle and DB2 database. I wanted to display the tables (For the particular user) from that database. This is very very simple in Oracle "Select table_name from tabs" will retrieve all the table names from the logged in user. Is there an easy access thing like this in DB2 as well, or do I have to take the approach of matching all the tables's creator name to user name and pull them out ?

    Any help would be fantastic!

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by STFXJava
    Hello all, I am very new to DB2 having almost all my experience in Oracle. I am currently writting a java GUI to connect to both an Oracle and DB2 database. I wanted to display the tables (For the particular user) from that database. This is very very simple in Oracle "Select table_name from tabs" will retrieve all the table names from the logged in user. Is there an easy access thing like this in DB2 as well, or do I have to take the approach of matching all the tables's creator name to user name and pull them out ?

    Any help would be fantastic!
    SELECT TABNAME FROM SYSCAT.TABLES WHERE DEFINER = ?
    --
    Jonathan Petruk
    DB2 Database Consultant

Posting Permissions

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