Results 1 to 4 of 4

Thread: user_tables ...

  1. #1
    Join Date
    Jan 2003
    Posts
    21

    Unanswered: user_tables ...

    Sorry for that question but I'm only a db2 noob ...

    Does exist a table like user_tables (used in oracle) in db2 to get all the tables create in a database ?

    What'is the oracle desc fonction in db2 ? (desc return a description of a table)

    Thks for your answers ...

  2. #2
    Join Date
    Sep 2002
    Posts
    456

    Re: user_tables ...

    You didn't specify which DB2 version and platform you are using but considering you are new I will assume it's DB2 UDB 7.x or close there.

    Now answer to your questions; You can syscat.tables to extract the tables in your database e.g.

    select * from syscat.tables

    In order to see the sturcture of any table use the following command:

    describe table <table_name> e.g.

    describe table employee

    Optionally if table belongs to another user/schema you can sepcify it as:

    describe table <schema_name>.<table_name> e.g.

    describe table syscat.tables

    Hope this helps.

    Paul

    Originally posted by arfman
    Sorry for that question but I'm only a db2 noob ...

    Does exist a table like user_tables (used in oracle) in db2 to get all the tables create in a database ?

    What'is the oracle desc fonction in db2 ? (desc return a description of a table)

    Thks for your answers ...

  3. #3
    Join Date
    Jan 2003
    Posts
    21

    Thumbs up

    and you hope this helps ???? of course it helps
    thks a lot for your answer and sorry for the lake of information

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    For table list, you can use

    list tables for schema <schema-name>

    also

    HTH

    Cheers

    Sathyaram

    Originally posted by arfman
    and you hope this helps ???? of course it helps
    thks a lot for your answer and sorry for the lake of information

Posting Permissions

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