SQL Error: 1064, SQLState: 42000

【報錯信息】

20190705 10:53:37.449 [http-apr-8080-exec-7] WARN  org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:77) - SQL Error: 1064, SQLState: 42000
20190705 10:53:37.450 [http-apr-8080-exec-7] ERROR org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.java:78) - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''TK' as column23_47_, dimensionr0_.`USEOR` as USEOR24_47_, dimensionr0_.'USETIME' at line 1

【錯誤原因】

類中字段的定義時:

/**
	 * 查詢結果耗時
	 */
	@Column(name = "'USETIME'")
	private long useTime;
//Column 中字段 符號應該是`` 而不是''

 

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