java.sql.SQLSyntaxErrorException: ORA-00904: "column": 標識符無效 首先查看無效的列是不是orcale關鍵字 , 如果不是 , 查看與column欄位相關的所有內容 , 引用是否正確 儘量不要用select 中的欄位別名當做 where 或者 o ...
java.sql.SQLSyntaxErrorException: ORA-00904: "column": 標識符無效
首先查看無效的列是不是orcale關鍵字 ,
如果不是 , 查看與column欄位相關的所有內容 , 引用是否正確
儘量不要用select 中的欄位別名當做 where 或者 order by 等的條件
應該使用表的別名或者表名作為標識 , 避免歧義
select user_id as id ,name as na
from table tb
where tb.name = 'XXX'
order by tb.user_id desc