diff --git a/script/docker/database.yml b/script/docker/database.yml index e7c276f5..36fb576a 100644 --- a/script/docker/database.yml +++ b/script/docker/database.yml @@ -1,6 +1,8 @@ version: '3' services: + # 此镜像仅用于测试 正式环境需自行安装数据库 + # SID: XE user: system password: oracle oracle: image: tekintian/oracle12c:latest container_name: oracle diff --git a/script/sql/oracle/oracle_ry_vue_4.X.sql b/script/sql/oracle/oracle_ry_vue_4.X.sql index c13f5ac4..5342d140 100644 --- a/script/sql/oracle/oracle_ry_vue_4.X.sql +++ b/script/sql/oracle/oracle_ry_vue_4.X.sql @@ -952,3 +952,16 @@ begin select instr(','||arg2||',' , ','||arg1||',') into Result from dual; return(Result); 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;