這個是查找infomix某個資料庫下的全部所有資訊(我建的資料庫是test01)
但是我需要的只有其中的colname,owner,idxname,idxtype,tabname這5列資訊,本人比較菜 不知道該如何下手該能實作
跪求 大神 賜教!!!!!!!!!!!

select sc.colname, si.owner, si.idxname, si.clustered, si.idxtype, st.tabname, st.owner, sc.colno, ABS(si.part1),ABS(si.part2),ABS(si.part3),ABS(si.part4),
ABS(si.part5),ABS(si.part6),ABS(si.part7),ABS(si.part8),ABS(si.part9),ABS(si.part10),ABS(si.part11),ABS(si.part12),ABS(si.part13),ABS(si.part14),ABS(si.part15),ABS(si.part16)
from test01:informix.systables st, test01:informix.sysindexes si, test01:informix.syscolumns sc where
(st.tabname like 'aaa' or st.tabname like 'aaa') and st.tabid = si.tabid and sc.tabid = st.tabid and st.owner like '%' and (sc.colno = ABS(si.part1) or
sc.colno = ABS(si.part2) or sc.colno = ABS(si.part3) or sc.colno = ABS(si.part4) or sc.colno = ABS(si.part5) or sc.colno = ABS(si.part6) or
sc.colno = ABS(si.part7) or sc.colno = ABS(si.part8) or sc.colno = ABS(si.part9) or sc.colno = ABS(si.part10) or sc.colno = ABS(si.part11) or
sc.colno = ABS(si.part12) or sc.colno = ABS(si.part13) or sc.colno = ABS(si.part14) or sc.colno = ABS(si.part15) or
sc.colno = ABS(si.part16)) union
select sc.colname, si.owner, si.idxname, si.clustered, si.idxtype, st.tabname, st.owner, sc.colno, ABS(0),ABS(0),ABS(0),
ABS(0),ABS(0),ABS(0),ABS(0),ABS(0),ABS(0), ABS(0),ABS(0),ABS(0),ABS(0),ABS(0),ABS(0), ABS(0) from
test01:informix.systables st, test01:informix.sysindices si, test01:informix.syscolumns sc where
(st.tabname like 'aaa' or st.tabname like 'aaa')and ( st.tabid = si.tabid and sc.tabid = st.tabid and st.owner like '%' )
and sc.extended_id in (select extended_id from test01:informix.sysxtdtypes) order by si.idxname
uj5u.com熱心網友回復:
自己先頂!d=====( ̄▽ ̄*)b 大神們幫幫忙啦!!!!!uj5u.com熱心網友回復:
dbschema -d test01 -t all -ss轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/73712.html
標籤:Informix
上一篇:informix通過onspace增加表空間后,可用空間為何會減半?
下一篇:informix 模糊查詢
