摘要: 在Oracle 11g中,Oracle 增加了2个查询:pivot(行转列) 和unpivot(列转行) pivot(聚合函数 for 列名 in(类型)) ,其中 in('') 中可以指定别名,in中还可以指定子查询 行转列: select * from rhsa_gcfx_result orde 阅读全文
posted @ 2017-06-29 13:46 ToBeABetterPerson 阅读(616) 评论(0) 推荐(0) 编辑
摘要: oracle查询重复数据 select * from 表 where 条件 and 判重字段 not in (select 判重字段 from 表 where 条件 group by 判重字段 having count(*) > 1) 根据rowid删除重复数据,保留一条 delete from 表 阅读全文
posted @ 2017-06-29 12:49 ToBeABetterPerson 阅读(581) 评论(0) 推荐(0) 编辑