如何用SQL语句查看Informix数据库表中的结构??
如题所述,就像MSSQL根据 sysobjects,syscolumns,systypes三个表就可以看到表的结构,informix数据库如何通过系统表查看表结构?
[解决办法]
SELECT c.colname, c.coltype FROM syscolumns c, systables t WHERE c.tabid = t.tabid AND t.tabname = 'xxxTable'
coltype 字段意义:
0 = CHAR 8 = MONEY
1 = SMALLINT 10 = DATETIME
2 = INTEGER 11 = BYTE
3 = FLOAT 12 = TEXT
4 = SMALLFLOAT 13 = VARCHAR
5 = DECIMAL 14 = INTERVAL
6 = SERIAL 15 = NCHAR
7 = DATE 16 = NVARCHAR