数据库
¤睿
一叶知秋
展开
-
oracle批量化查询指定表的字段信息
DECLARE type projects_varray2 is varray(10000) of varchar2(20000); --定义数组 o1 varchar2(32765); o2 varchar2(32765); v_projects projects_varray2:=projects_varray2( 'table_name_test1', 'table_name_test2', 'table_name_test3', 'table_name_test4' ); begin原创 2021-02-23 16:20:10 · 548 阅读 · 0 评论 -
oracle批量化查询表名注释
DECLARE v_sqls varchar2(5000) := ''; type projects_varray2 is varray(64) of varchar2(200); --定义数组 --手动输入表名 v_projects projects_varray2:=projects_varray2('table_name_test1', 'table_name_test2', 'table_name_test3', 'table_name_test4' ); begin --循环获得原创 2021-02-23 15:03:05 · 364 阅读 · 0 评论 -
oracle中查询表注释和字段注释
查询表注释: select * from user_tab_comments a where a.table_name='xxx'; 查询字段注释: select * from all_tab_columns a where a.TABLE_NAME='xxx';原创 2021-02-23 11:27:37 · 3177 阅读 · 0 评论 -
oracle和hive关于空字符串和null的判断
首先看oracle的输出结果 with q1 as( select '' test1, null test2 from dual) select case when test1='' then '空字符串' when test1 is null then '空' else '啥也不是' end test1, case when test2='' then '空字符串' when test2 is null then '空' else '啥也不是' end tes原创 2021-01-06 10:57:59 · 398 阅读 · 0 评论 -
oracle对比两表不同数据
select t1.* from (select * from TABLE_FACT minus select * from TABLE_FACT_TEST) t1 union select t2.* from (select * from TABLE_FACT_TEST minus select * from TABLE_FACT) t2;原创 2021-01-05 16:46:59 · 851 阅读 · 0 评论 -
数据库
1.数据库和excel 1.1数据库和excel处理重复数据和空值 1.1.1excel中处理重复值和空值 选中数据,在导航栏数据下 可以快速删除重复数据。 如果excel来计算重复的次数,可以通过选中数据,插入数据透视表即可。 处理空值 通过查找替换的功能即可 1.1.2sqlerver处理重复值和空值 处理重复值 select * from dbo.ZF_白云区 select distinct 位置区域 from dbo.ZF_白云区 select 位置区域,count(0) as 次数 f原创 2020-06-23 18:14:02 · 128 阅读 · 0 评论