我正在使用 SQLcl 生成 csv 输出。
set sqlformat csv
set heading off
select * from hr.employees where rownum < 10;
"EMPLOYEE_ID","FIRST_NAME","LAST_NAME","EMAIL","PHONE_NUMBER","HIRE_DATE","JOB_ID","SALARY","COMMISSION_PCT","MANAGER_ID","DEPARTMENT_ID"
100,"Steven","King","SKING","515.123.4567",17-JUN-03,"AD_PRES",24000,,,90
101,"Neena","Kochhar","NKOCHHAR","515.123.4568",21-SEP-05,"AD_VP",17000,,100,90
102,"Lex","De Haan","LDEHAAN","515.123.4569",13-JAN-01,"AD_VP",17000,,100,90
103,"Alexander","Hunold","AHUNOLD","590.423.4567",03-JAN-06,"IT_PROG",9000,,102,60
104,"Bruce","Ernst","BERNST","590.423.4568",21-MAY-07,"IT_PROG",6000,,103,60
但我得到了我不想要的标题。我想 set heading off 应该关闭标题(就像在 SQLPlus 中所做的那样)为什么它在 SQLcl 中不起作用。如果我清除了 sql 格式(设置 sqlformat),那么就可以正常工作了。它是 SQLcl 中的错误吗?