oracle ORA-01747(系統保留關鍵字)user.table.column, table.column 或列說明無效 hibernate映射oracle保留關鍵字


1、查詢系統關鍵

select * from v$reserved_words

確認你使用的是否為關鍵字:

select * from v$reserved_words w where w.KEYWORD='LEVEL';  

2、系統關鍵字需要加雙引號

update UT_MENU  set "LEVEL"=2 where menuid=57886

如果這條語句在在sqlplus里面執行,則同樣會提示ORA-01747錯誤,可以到sqlplus命令行里面執行就ok。有知道sqlplus怎么弄給我說下,謝謝。

sqlplus:

update UT_MENU  set "LEVEL"=2 where menuid=57886;

commit;

3、在補充hibernate映射oracle關鍵字

正確的:

<property name="level" type="java.lang.Integer"> 
             <column name='"level"' precision="1" scale="0" /> 
</property> 

  錯誤的:

<property name="level" type="java.lang.Integer"> 
             <column name="level" precision="1" scale="0" /> 
       </property> 
   </class> 

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM