去https://www.deskui.com (HHDBCS社区),下载Linux下的JDK
把下载的jdk解压到,HHDBCS解压后的jdk目录
把HHDBCS解压后的start_csadmin.sh改为可运行, chmod +x start_csadmin.sh
直接运行start_csadmin.sh
Oracle脚本:
SELECT 1 as con_1, '2' as con_2,tt.emp_id,lead_id,emp_name,salary,level,to_char (salary,'999') FROM emp tt WHERE level>1 START WITH lead_id = 0 connect BY prior tt.emp_id = lead_id
转化的Postgresql脚本:
WITH RECURSIVE Tab_HH__9 AS ( SELECT tt.emp_id,lead_id,emp_name,salary,1 AS level ,to_char(salary::numeric,'999') AS alias_HH__18 FROM EMP tt WHERE lead_id::numeric=0 UNION ALL SELECT Tab_HH__10.emp_id,Tab_HH__10.lead_id,Tab_HH__10.emp_name,Tab_HH__10.salary,Tab_HH__9.level + 1 AS level ,Tab_HH__10.alias_HH__18 FROM ( SELECT tt.emp_id,lead_id,emp_name,salary,to_char(salary::numeric,'999') AS alias_HH__18 FROM EMP tt) Tab_HH__10 INNER JOIN Tab_HH__9 ON Tab_HH__9.emp_id=Tab_HH__10.lead_id) SELECT 1 AS con_1 ,'2' AS con_2 ,emp_id,lead_id,emp_name,salary,level,alias_HH__18 FROM Tab_HH__9 WHERE level>1 ;