求informix索引问题!!!!!!

dianxian0273 2017-08-01 05:01:24
这个是查找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
...全文
612 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
请叫我曾阿牛 2019-01-20
  • 打赏
  • 举报
回复
dbschema -d test01 -t all -ss
dianxian0273 2017-08-01
  • 打赏
  • 举报
回复
自己先顶!d=====( ̄▽ ̄*)b 大神们帮帮忙啦!!!!!

1,194

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 Informix
社区管理员
  • Informix社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧