#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    25
    Rep Power
    0

    How to get a list of tables in a database


    I would like to get a list of the tables in a FireBird database. Like with 'show tables' in MySQL. How is this done in FireBird?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,781
    Rep Power
    348
    Originally Posted by Decebal
    I would like to get a list of the tables in a FireBird database. Like with 'show tables' in MySQL. How is this done in FireBird?
    show table;
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    25
    Rep Power
    0
    Originally Posted by shammat
    show table;
    When I do this I get:
    Token unknown: show

    But I found the answer:
    SELECT RDB$RELATION_NAME
    FROM RDB$RELATIONS
    WHERE RDB$SYSTEM_FLAG = 0
    AND RDB$VIEW_BLR IS NULL
    ORDER BY RDB$RELATION_NAME

    Sorry for the bad layout, but I could not get indent and the like to work.
  6. #4
  7. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    25
    Rep Power
    0
    Originally Posted by pabloj
    Are you running it from ibeasy+ or other graphical client? It works fine from isql.
    I did it from Database Workbench.
    It should work as a normal SQL statement (as my solution does), because it needs to be done from within a program.

IMN logo majestic logo threadwatch logo seochat tools logo