Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005

    Arrow Unanswered: Need query for getting the table information

    I have a database say "mydb" and i have tables in that with different owners
    I want a query which gets me all the information regarding the table.

    For example if i give the tablename as emp then i want the output as

    empno Integer --
    ename char 20
    doj date --
    desig varchar 30

    Please help me out i am in a serious need of it.
    Last edited by vkagiri; 12-02-05 at 13:22.

  2. #2
    Join Date
    Feb 2005
    From the command line you could use the 'dbschema' command.

    $ dbschema -d <database> -t <table>

    So, using your examples:

    $ dbschema -d mydb -t emp

    You can also get information on all tables:

    $ dbschema -d mydb -t all

    Does this help you?

  3. #3
    Join Date
    Dec 2005

    my rquirement is to embed this in to a esql code

    the command u gave me works good when i do from command prompt but
    my rquirement is to embed this in to a esql code so that i can populate the result got by this on to a gui.

    please help me out.

  4. #4
    Join Date
    Nov 2003

    whith this sql you can get al linfo about the table or view.
    you can run this through dbaccess or you can make a script that take an arg which could be the tabname and run it.

    select *
    from systables
    where tabname = ' table name '

    good luck

Posting Permissions

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