Hibernate的sql不能以分號結尾。org.hibernate.exception.DataException: could not execute query

Hibernate中使用sql語句結尾千萬別帶分號。

select title_cn, search_field
  from tb_title_c
 where table_name = 'TB_SUPPLIER_C'
 order by order_num asc;

這段代碼在數據庫中執行無誤。但是在java後臺卻一直報錯,原因就是hibernate不能接受sql後面帶分號。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章