• 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;




  • 相关阅读:
    读写二进制c# 二进制读写
    重构风险程序员一定要遵守的规则
    文件区域使用fcntl锁定文件,并且测试
    数据清空js清空div里的数据问题
    模板缓存ThinkPHP中的模板引擎和视图层
    描述null11121 Base 2
    操作系统请求操作系统 算法
    工程项目eclipse项目名前出现红色感叹号,小红叉解决
    程序链接关于静态链接,动态链接,共享库,ABI的一些记录(os学习)
    NMAKE命令行编译
  • 原文地址:https://www.cnblogs.com/zhangkaimin/p/16352439.html
Copyright © 2020-2023  润新知