select owner,
max( decode( object_type, 'TABLE', cnt, null ) ) Tables,
max( decode( object_type, 'VIEW', cnt, null ) ) Views,
max( decode( object_type, 'TRIGGER', cnt, null ) ) triggers,
max( decode( object_type, 'PACKAGE', cnt, null ) ) packages
from ( select owner, object_type, count(*) cnt
from dba_objects
group by owner, object_type )
group by owner
/
max( decode( object_type, 'TABLE', cnt, null ) ) Tables,
max( decode( object_type, 'VIEW', cnt, null ) ) Views,
max( decode( object_type, 'TRIGGER', cnt, null ) ) triggers,
max( decode( object_type, 'PACKAGE', cnt, null ) ) packages
from ( select owner, object_type, count(*) cnt
from dba_objects
group by owner, object_type )
group by owner
/
No comments:
Post a Comment