【Bug】解決 java.sql.SQLSyntaxErrorException 異常


 

    java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax 錯誤

錯誤詳情:

Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'interval, is_loop, remarks, standard_id' at line 1

  本以為是我插入傳參用swagger示例傳入的有問題,正兒八經寫參數還是如此。

 

出現此錯誤為:數據庫字段存在關鍵字,表中的字段不可與SQL中的關鍵字相同(本次我遇到的問題interval是SQL中的關鍵字

      或 數據庫字段不匹配,語法錯誤 等引起的錯誤

只需檢查數據庫和sql語句即可解決!


免責聲明!

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



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