Looking For A Command To Show Table Structures On The Screen

Looking For A Command To Show Table Structures On The Screen

Post by aleato » Mon, 04 Feb 2002 01:19:06



Hi all,

A newbie question.

The Oracle SQL*Plus program has a very handy command called
"DESC" to show table structures on the screen. The following
shows its usage:

     | DESC students                        
     |
     | Name               Null?    Type
     | ------------------ -------- ----------
     | STUDENT_ID         NOT NULL NUMBER(8)
     | SALUTATION                  VARCHAR2(5)
     | FIRST_NAME                  VARCHAR2(25)
     | LAST_NAME          NOT NULL VARCHAR2(25)
     | STREET_ADDRESS              VARCHAR2(50)
     | ZIP                NOT NULL VARCHAR2(5)
     | PHONE                       VARCHAR2(15)
     | etc...

I'm looking for an equivalent Infomix command which does
the same thing. Is there any?

I appreciate any help.

Thanks in advance!

alea

 
 
 

Looking For A Command To Show Table Structures On The Screen

Post by Volker Fraenkl » Mon, 04 Feb 2002 03:35:05


Hi alea,


> The Oracle SQL*Plus program has a very handy command called
> "DESC" to show table structures on the screen. The following
> shows its usage:

...

Quote:> I'm looking for an equivalent Infomix command which does
> the same thing. Is there any?

what about dbschema?

dbschema -d <database> {-t <tablename>} -ss {filename}

if filename is not set, output will be written to screen.
HTH, Volker

--
Volker Fraenkle


 
 
 

Looking For A Command To Show Table Structures On The Screen

Post by Volker Fraenkl » Mon, 04 Feb 2002 03:35:16


Hi alea,


> The Oracle SQL*Plus program has a very handy command called
> "DESC" to show table structures on the screen. The following
> shows its usage:

...

Quote:> I'm looking for an equivalent Infomix command which does
> the same thing. Is there any?

what about dbschema?

dbschema -d <database> {-t <tablename>} -ss {filename}

if filename is not set, output will be written to screen.
HTH, Volker

--
Volker Fraenkle

 
 
 

Looking For A Command To Show Table Structures On The Screen

Post by Paul Redma » Mon, 04 Feb 2002 04:34:23


Quote:>> command to show database stuctures

The command in Informix is called INFO ie.

INFO COLUMNS FOR <tablename>

You can run this in dbaccess.


> Hi all,

> A newbie question.

> The Oracle SQL*Plus program has a very handy command called
> "DESC" to show table structures on the screen. The following
> shows its usage:

>      | DESC students
>      |
>      | Name               Null?    Type
>      | ------------------ -------- ----------
>      | STUDENT_ID         NOT NULL NUMBER(8)
>      | SALUTATION                  VARCHAR2(5)
>      | FIRST_NAME                  VARCHAR2(25)
>      | LAST_NAME          NOT NULL VARCHAR2(25)
>      | STREET_ADDRESS              VARCHAR2(50)
>      | ZIP                NOT NULL VARCHAR2(5)
>      | PHONE                       VARCHAR2(15)
>      | etc...

> I'm looking for an equivalent Infomix command which does
> the same thing. Is there any?

> I appreciate any help.

> Thanks in advance!

> alea

 
 
 

Looking For A Command To Show Table Structures On The Screen

Post by <rk_use.. » Tue, 05 Feb 2002 04:38:52


You can use info from command from dbaccess.

Or dbschema.

I have a tool called infotable which is there in IIUG.
You can email me to get the latest version.

infotable gives information about a table like Oracle
desc. I think it gives more information about a table
than Oracle desc.

For eg:-

$  infotable -d database_name -t table_name

Info for the table: city                 Owner = john
|------------------------------------------|-------------------|----------|
---|
|Column Name                               |Column Type        |Null
|Key|
|------------------------------------------|-------------------|----------|
---|
|citycode                                  |CHAR(3)            |null
|IDX|
|cityname                                  |VARCHAR(40,1)      |null      |
|
|airportcode                               |CHAR(3)            |null
|PKY|
|airportname                               |VARCHAR(40,1)      |null      |
|
|state_prov                                |CHAR(2)            |null      |
|
|country                                   |CHAR(2)            |null
|FKY|
|zone_code                                 |MINT               |null      |
|
|proximity                                 |CHAR(20)           |null      |
|
|------------------------------------------|-------------------|----------|
---|
Primary key  :(airportcode)
Foreign key  :(country) refers country_master
Index        :(citycode)
Other tables which refer this table: city_pair
Check zone_code in (1,2,3,4,5,6)

The tool is written in ESQL/C.

Ravi


Quote:> Hi all,

> A newbie question.

> The Oracle SQL*Plus program has a very handy command called
> "DESC" to show table structures on the screen. The following
> shows its usage:

>      | DESC students
>      |
>      | Name               Null?    Type
>      | ------------------ -------- ----------
>      | STUDENT_ID         NOT NULL NUMBER(8)
>      | SALUTATION                  VARCHAR2(5)
>      | FIRST_NAME                  VARCHAR2(25)
>      | LAST_NAME          NOT NULL VARCHAR2(25)
>      | STREET_ADDRESS              VARCHAR2(50)
>      | ZIP                NOT NULL VARCHAR2(5)
>      | PHONE                       VARCHAR2(15)
>      | etc...

> I'm looking for an equivalent Infomix command which does
> the same thing. Is there any?

> I appreciate any help.

> Thanks in advance!

> alea