Oracle维护常用SQL语句(2)
时间:2007-12-23 来源:不详 作者:迈克DB
22、按用户查看object种类
selectu.nameschema,sum(decode(o.type#,1,1,NULL))indexes,
sum(decode(o.type#,2,1,NULL))tables,sum(decode(o.type#,3,1,NULL))
clusters,sum(decode(o.type#,4,1,NULL))views,sum(decode(o.type#,5,1,
NULL))synonyms,sum(decode(o.type#,6,1,NULL))sequences,
sum(decode(o.type#,1,NULL,2,NULL,3,NULL,4,NULL,5,NULL,6,NULL,1))
othersfromsys.obj$o,sys.user$uwhereo.type#>=1andu.user#=
o.owner#andu.name<>’PUBLIC’groupbyu.nameorderby
sys.link$unionselect’CONSTRAINT’,count(*)fromsys.con$
织梦好,好织梦
上一篇:Oracle关于时间/日期的操作 下一篇:Oracle维护常用SQL语句(1)
文章评论
共有位Admini5网友发表了评论 查看完整内容