Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DESC command in Informix DB

7,586 views
Skip to first unread message

James

unread,
Sep 28, 2002, 4:59:49 AM9/28/02
to
Hi,

Just wondering whether there is a similar DESC Oracle SQL command
in Informix, which shows the fields of a table.


Thanks in advance.

Langelage, Frank

unread,
Sep 28, 2002, 7:05:25 AM9/28/02
to


With "info columns for <tablename>" you can something similar with informix.
Further more you also can use indexes, status, priviledges, ... instead
of colums in the statement above.

You can take a look at online help in dbaccess -> query language -> new
-> ctrl-w -> others.

Regards
Frank

Hamid HABZI

unread,
Sep 30, 2002, 9:06:19 AM9/30/02
to

Hi,
You can do this in two ways to do that :
1 - ussing dbschama -d dababase -t table to display structure of the table
(In sql ordres) or redirect it to a file (dbschama -d dababase -t table
filename).
2 - Using dbaccess --> table --> info --> choice a table -->
columns,indexes, provileges...

Ragerds.
H.HABZI.
BMCE BANK


-----Message d'origine-----
De : ehc...@hotmail.com [mailto:ehc...@hotmail.com]
Envoyé : samedi 28 septembre 2002 09:00
À : inform...@iiug.org
Objet : DESC command in Informix DB

Rajib Sarkar

unread,
Sep 30, 2002, 12:21:24 PM9/30/02
to

there's the "info" command similar to that ... but with dbaccess you can
actually just go to Query Language -> Info -> <table_name> and get all the
information you need ..e.g. constraints, indexes, triggers etc. ...

I guess that's much better than writing scripts to get the information in
ORACLE ..:-)

Thanx much,

Rajib Sarkar
Advisory Support Engineer (Wells Fargo Bank)
IBM Data Management Group
Ph : (602)-217-2100
Fax: (602)-217-2100

Thought is never complete unless it finds expression in action and action
limits your thought -- Mahatma Gandhi


ehc...@hotmail.co
m (James) To: inform...@iiug.org
Sent by: cc:
owner-informix-li Subject: DESC command in Informix DB
s...@iiug.org


09/28/2002 01:59
AM
Please respond to
ehchn1

rkusenet

unread,
Sep 30, 2002, 1:07:49 PM9/30/02
to
"James" <ehc...@hotmail.com> wrote:

> Hi,
> Just wondering whether there is a similar DESC Oracle SQL command
> in Informix, which shows the fields of a table.

You can use my tool infotable from iiug.org which gives the
same information like Oracle DESC from unix command line.
I think it gives much more information than DESC.

A sample of the output:

$ infotable -d database -t table

Info for the table: table name Owner = john
|------------------------------------------|-------------------|----------|---|
|Column Name |Column Type |Null |Key|
|------------------------------------------|-------------------|----------|---|
|seq_num |SERIAL |not null |PKY|
|destination_code |CHAR(3) |not null |IDX|
|brochure_id |CHAR(3) |not null |FKY|
|from_date |DATE |not null |IDX|
|to_date |DATE |not null |IDX|
|air_only_offered |CHAR(1) |not null | |
|fly_and_drive |CHAR(1) |not null | |
|air_and_hotel |CHAR(1) |not null | |
|------------------------------------------|-------------------|----------|---|
Primary key :(seq_num)
Foreign key :(brochure_id) refers brochure_master
Index :(destination_code,from_date,to_date)
Check constraints for this table:
(air_only_offered IN ('Y' ,'N' ) )
(fly_and_drive IN ('Y' ,'N' ))
(air_and_hotel IN ('Y' ,'N' ))


I think the version in iiug is slightly outdated. You can email me to
get the latest version. You need ESQL/C compiler to compile this tool.

Ravi


Leon Pappadopoulos

unread,
Sep 30, 2002, 3:29:24 PM9/30/02
to

dbschema -d <database> -t <tablename>

- .... .. ... - --- --- ... .... .- .-.. .-.. .--. .- ... ...

-----Original Message-----
From: ehc...@hotmail.com [mailto:ehc...@hotmail.com]
Sent: Saturday, September 28, 2002 11:00 AM
To: inform...@iiug.org
Subject: DESC command in Informix DB


Hi,

Just wondering whether there is a similar DESC Oracle SQL command
in Informix, which shows the fields of a table.


Thanks in advance.

blackguard

unread,
Sep 30, 2002, 4:24:10 PM9/30/02
to

use this sql command and replace <table-name> with you actual table:

info columns for <table-name>
;

--
Posted via http://dbforums.com

0 new messages