com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE
提示的原因是“ xxx ”double型不是正確的,錯誤的原因在於把資料庫
update user set username='xxx',password='yyy' where id='zzz'
錯寫成
update user set username='xxx' and password='yyy' where id='zzz'
將分隔符,錯寫為and
如果是用ssm框架的話,正確的寫法應該是:
<update id="updateUser" parameterType="user">
update sys_user
<set >
<if test="user_name!=null">
user_name=#{user_name} ,
</if>
<if test="user_password!=null">
user_password=#{user_password},
</if>
</set>
where user_id=#{user_id}
</update>
相關文章
- Java更新資料庫報錯:Data truncation: Cannot create a JSON value from a string with CHARACTER SETJava資料庫JSON
- MySQL, Incorrect usage of UNION and ORDER BYMySql
- java.sql.BatchUpdateException: Date truncation: Out of range value for column xxxxxJavaSQLBATException
- MySQL double writeMySql
- double 函式函式
- SQLSTATE [22007]: Invalid datetime format: 1292 IncorrectSQLORM
- java.sql.SQLException: Incorrect string valueJavaSQLException
- CF708D Incorrect Flow 題解
- ByteCTF2021 double sqliTF2SQL
- 【MySQL】八、double write 淺析.MySql
- MySQL double write存在意義MySql
- [ABC351F] Double Sum
- int/double資料範圍
- MyIsam 表 “ Incorrect key file for table 't_ '; try to repair it”AI
- Big Data and Data Warehousing
- abs(int)、fabs(double)函式用法函式
- AtCoder Beginner Contest 351 F - Double Sum
- PG double buffering的最佳化
- Double BigDecimal 精度丟失總結Decimal
- mysql innodb double write概念彙總MySql
- 記一次 打包報錯:Keystore was tampered with, or password was incorrect
- Incorrect MEMORY_MAX_TARGET (> Available RAM) Can Lead To Database HangsAIDatabase
- 強化學習(十)Double DQN (DDQN)強化學習
- java double、float型別的比較Java型別
- [atcoder 351] [F Double Sum] [線段樹]
- 雙陣列字典樹(Double Array Trie)陣列
- MySQL的Double Write並不難理解MySql
- 兩個double之間的運算
- float和double有什麼區別?
- 解決問題:OSError: Unable to open file (truncated file: eof = 22118400, sblock->base_addr = 0, stored_eofErrorBloC
- win10 double commander如何安裝_win10系統double commander安裝步驟【圖文】Win10
- 【BUG記錄】MySQL插入Emoji表情報錯"Incorrect string value"MySql
- 【故障處理】ORA-39123,ORA-19722 datafile is an incorrect version
- Double型別轉換成BigDicimal問題型別
- Double Kill!! 資料聯邦修煉之路
- float double 型別資料極值表示型別
- C/C++ 恨透了 double free or corruptionC++
- network xxx was found but has incorrect label com.docker.compose.network set to "xxx"Docker
- data URI