• Oracle 查询函数、存储过程、触发器、表、视图等


    --查询所有对象
    select distinct type from user_source

    --视图
    select count(*)  from user_views;
    select *  from user_views;

    --物理视图
    select count(*) from user_mviews
    select * from user_mviews

    --表
    select count(*) from user_tables;
    select * from user_tables;

    --查看当前用户的所有序列
    select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where sequence_owner='XXXXXX';

    --查询当前用户的序列总数
    select count(*) from dba_sequences where sequence_owner='XXXXXX';

    --触发器
    select count(*) from user_triggers;
    select * from user_triggers;

    --存储过程
    select count(*) from user_procedures where object_type='PROCEDURE';
    select * from user_procedures where object_type='PROCEDURE';

    --索引
    select count(*) from user_indexes;
    select * from user_indexes;

    --函数
    select count(*) from user_procedures where object_type='FUNCTION';
    select * from user_procedures where object_type='FUNCTION';

    --包
    select object_name,count(object_name) from user_procedures where object_type='PACKAGE'group by object_name;
    select object_name from user_procedures where object_type='PACKAGE' group by object_name;

    --包体
    select name,count(name) from ALL_SOURCE t where t.TYPE = 'PACKAGE BODY' and owner = 'XXXXXX'group by name;
    select name from ALL_SOURCE t where t.TYPE = 'PACKAGE BODY' and owner = 'XXXXXX'group by name;

    --类型
    select name,count(name) from ALL_SOURCE t where t.TYPE = 'TYPE' and owner = 'XXXXXX'group by name;
    select name from ALL_SOURCE t where t.TYPE = 'TYPE' and owner = 'XXXXXX'group by name;
    select name from ALL_SOURCE t where t.TYPE = 'TYPE' and owner = 'XXXXXX'group by name;

    --类型体
    select name,count(name) from ALL_SOURCE t where t.TYPE = 'TYPE' and owner = 'XXXXXX'group by name;
    select name from ALL_SOURCE t where t.TYPE = 'TYPE' and owner = 'XXXXXX'group by name;
    select name from ALL_SOURCE t where t.TYPE = 'TYPE' and owner = 'XXXXXX'group by name;

    --java source
    select name,count(name) from ALL_SOURCE t where t.TYPE = 'JAVA SOURCE' and owner = 'XXXXXX'group by name;
    select name from ALL_SOURCE t where t.TYPE = 'JAVA SOURCE' and owner = 'XXXXXX'group by name;
    select name from ALL_SOURCE t where t.TYPE = 'JAVA SOURCE' and owner = 'XXXXXX'group by name;




  • 相关阅读:
    20150128-堆雪人
    20150127-梦里笑醒的声音
    20150126-渡口
    20150125-阴天
    FastAdmin 的上传代码在哪里?
    在 Linux 安装 IIS?
    FastAdmin env.sample 的用法
    可以方便配合 Git 的现代编辑器
    运算放大器复习
    Linux 权限使用 777 真的好吗?
  • 原文地址:https://www.cnblogs.com/zhangkaimin/p/16352439.html
Copyright © 2020-2023  润新知