如何在 Oracle SQL 开发人员中以驼峰形式获取列名 [英] How to get column names in camelcase in Oracle SQL developer
问题描述
我正在尝试对 Oracle SQL 开发人员运行一些查询例如
I am trying to run few queries on Oracle SQL developer e.g
Select name AS CandidateName, age AS CandidateAge
from tbl_candidate_details
order by candidate_id desc
但在结果中,我得到的列名称为CANDIDATENAME"和CANDIDATEAGE".
But In the result I am getting the column names as "CANDIDATENAME" AND "CANDIDATEAGE".
有什么方法可以将我在 select 语句(CandidateName"和CandidateAge")中给出的驼峰字符作为驼峰字符获取?
Is there a way where I can get this as camelcase characters what I have given in the select statement("CandidateName" and "CandidateAge") ?
推荐答案
如果列别名用双引号括起来,SQL Developer 将使用这些精确值作为查询结果中的列名:
If the column aliases are wrapped in double-quotes, SQL Developer will use those exact values as the column names in the query results:
SELECT name AS "CandidateName", age AS "CandidateAge"
FROM tbl_candidate_details
ORDER BY candidate_id DESC;
否则查询结果中的列名总是大写
Otherwise, the column names in the query results are always displayed in upper case
这篇关于如何在 Oracle SQL 开发人员中以驼峰形式获取列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!