我对谷歌搜索或搜索搜索没有任何好运,所以这里有。
我有以下SQL语句,我正在尝试针对HSQLDB 2.3.0运行。
select
tr.id as training_request_id,
s.id as student_id,
s.first_name as student_first_name,
s.last_name as student_last_name,
s.title as student_title,
c.id as customer_id,
c.name as customer_name,
trs.status
from training_request tr
left outer join student s on tr.student_id = s.id
left outer join customer c on tr.customer_id = c.id
left outer join training_request_status trs on tr.id = trs.training_request_id
where tr.slot_id is not null
order by tr.id, trs.date_entered DESC
当它回来时,colums是: ID,ID,FIRST_NAME,LAST_NAME,TITLE,ID,NAME,STATUS
为什么AS关键字没有任何影响?
更新:这是SQuirreL的截图。引用student_id列无效。
答案 0 :(得分:1)
想出来。
有一个名为“get_column_name”的连接属性。将其设置为false。默认值为true。
http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html JDBC:HSQLDB:HSQL://本地主机/入学; get_column_name =假