为什么这个查询无效?

时间:2013-02-17 06:19:16

标签: java sql oracle

为什么此查询无效?当我写作 只是SRV_ID而不是vt_exam_details.SRV_ID一切正常

 cl_id
, cl_name_last as CUSTOMER
, vt_animals.an_type
, vt_exam_details.SRV_ID
, vt_services.srv_desc
, vt_exam_details.ex_fee
from vt_clients
join vt_animals using (cl_id)
join vt_exam_headers using (an_id)
join vt_exam_details using (ex_id)
join vt_services using (srv_id)

错误:

Error at Command Line:5 Column:3
Error report:
SQL Error: ORA-00904: "VT_EXAM_DETAILS"."SRV_ID": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:

感谢。

2 个答案:

答案 0 :(得分:1)

因为表vt_exam_details不在FROM子句中?

答案 1 :(得分:0)

表VT_EXAM_DETAILS中是否有SRV_ID?