oracle
鱼小溪
宁愿跑起来被拌倒无数次,也不愿规规矩矩走一辈子。就算跌倒也要豪迈的笑。
展开
-
oracle的merge语句和mysql的 ON DUPLICATE KEY UPDATE 的互相转换!!!
-- oraclemerge into BASE_EXT_DICT t using (select LOWER(word) word from base_negative_word where isvalid = #{isvalid} ) s on (s.word = t.ext_word and t.ext_type =1 and t.isvalid = 1 ) when matched then UPDATE SET t.updatetime = S...原创 2020-07-27 15:19:08 · 1434 阅读 · 0 评论 -
oracle 语句 regexp_like
select EXT_WORD,EXT_TYPE,REMARKfrom base_ext_dict t where t.ext_type = 8--and regexp_like ( EXT_WORD,'集团')and ID not in ( select id from base_ext_dict t where t.ext_type = 8 and (regex...原创 2020-05-08 15:37:52 · 279 阅读 · 0 评论 -
insert into select
二:扩展词汇数据导入的SQL-- xuxi 1.负面词表(类型为1) 注意:是不是导负面词全表?待定! insert into BASE_EXT_DICT ( ID, EXT_WORD, EXT_TYPE, ISVALID, CREATE_USER, CREATETIME, UPDATE...原创 2020-05-07 17:07:34 · 234 阅读 · 0 评论 -
oracle数据库查询分组之外的数据方法------不使用group by
需求:想根据某一个字段进行分组,然后取出所有的列数据,在mysql 中,可以直接通过 group by 进行相应的操作获取数据,但是在ORACLE中,所取的字段必须要与group by 中相一致,才能进行读取操作,因为分组后的其他字段,oracle 并不知道要返回哪一个,但是这种需求又是存在的。怎么办,找到的解决方案:-- 格式select * from (select t.*, ...原创 2020-01-08 17:18:30 · 3275 阅读 · 0 评论 -
meger into 的用法!!!
merge into的形式: MERGEINTO [target-table] AUSING [source-tablesql] BON([conditional expression]and [...]...) WHENMATCHEDTHEN [UPDATEsql] WHENNOTMATCHEDTHEN ...原创 2020-01-08 16:52:53 · 701 阅读 · 0 评论