A tool to display table information
Posted in 2000
Hi, Frustrated by lack of a tool in informix to get the table information like Oracle's describe command, I wrote a tool which gives the entire information about the table. In fact much more than the Oracle's describe command. I have mailed it to iiug to be uploaded. Attached below is a copy of readme file to give a picture of what the tool does. Acknowledgement due to Art Kagel. I customised his myschema.sql tool to develop this tool. cheers. Ravi Krishna ============================================================= This is a very single file infotable.ec. just compile it. 1. Long table names: Even though the program can handle long table names of 128 chars, due to space limitation for display, only first 18 characters of table and indices name will be displayed. 2. A sample of the output is given below. Due to cut and paste, the pipe and dash symbols may be asymeterical. Info for table: dim_account |------------------|--------------------|-----------|-------------------------| |Column Name |Column Type |Null |Key/Index | |------------------|--------------------|-----------|-------------------------| |accountkey |INTEGER |not null |PKY | |accountid |CHAR(16) |not null |Unique Index | |accountname |VARCHAR(40) |not null | | |accountstatus |CHAR(8) |not null |Unique Index | |taxid |CHAR(11) |not null | | |reversaltran |CHAR(1) |not null | | |accountbranchcode |CHAR(3) |not null | | |accountbranchname |VARCHAR(40) |not null | | |datecreated |DATE |not null | | |managed |CHAR(5) |not null | | |aokey |INTEGER |not null |FKY -> dim_employee | |iokey |INTEGER |not null |FKY -> dim_employee_i | |productlinekey |INTEGER |not null |FKY -> dim_productline | |investmentaprkey |INTEGER |not null |FKY -> dim_investapprv | |timestamp |INTEGER |not null | | |------------------|--------------------|-----------|-------------------------| Primary key : 115_106(accountkey) Foreign key : 115_156(aokey) Foreign key : 115_157(iokey) Foreign key : 115_158(productlinekey) Foreign key : 115_159(investmentaprkey) Unique Index : dim_account1(accountid DESC,accountstatus) Other tables referring this table: fact_position,fact_transaction Checks constrains for this table: (reversaltran in ('A','F','Q')) ================================================= The output fields and columns are self explanatory. Please report any bugs to srkrishna@yahoo.com. Also if someone feels that more information can be added to this, email me. thanks. Ravi Krishna