fix 修复oracle时间查询相关问题

feature/model
疯狂的狮子li 3 years ago
parent 604c671d41
commit a72fa8038f

@ -1,6 +1,8 @@
version: '3' version: '3'
services: services:
# 此镜像仅用于测试 正式环境需自行安装数据库
# SID: XE user: system password: oracle
oracle: oracle:
image: tekintian/oracle12c:latest image: tekintian/oracle12c:latest
container_name: oracle container_name: oracle

@ -952,3 +952,16 @@ begin
select instr(','||arg2||',' , ','||arg1||',') into Result from dual; select instr(','||arg2||',' , ','||arg1||',') into Result from dual;
return(Result); return(Result);
end find_in_set; end find_in_set;
/ -- 函数分隔符
-- ----------------------------
-- 钩子 用于session连接之后 自动设置默认的date类型格式化 简化时间查询
-- 如需设置其它配置 可在此钩子内任意增加处理语句
-- 例如: SELECT * FROM sys_user WHERE create_time BETWEEN '2022-03-01 00:00:00' AND '2022-04-01 00:00:00'
-- ----------------------------
create or replace trigger login_trg
after logon on database
begin
execute immediate 'alter session set nls_date_format=''YYYY-MM-DD HH24:MI:SS''';
end login_trg;

Loading…
Cancel
Save