[英]How to update the BLOB column in Oracle database with java
我正在嘗試更新我插入數據庫的圖片。 我嘗試使用update
語句。 但它產生錯誤ORA-00933: SQL command not properly ended
。
我嘗試的是:
StringBuilder sb=new StringBuilder(1024);
sb.append("update ").append(uname).append("PROFILEPICTURE set PROFILEPICT=? where ID=1 for update");
String query = sb.toString();
PreparedStatement ps = con.prepareStatement(query);
ps.setBinaryStream(1, is);
我不知道如何更新BLOB內容請有人告訴我如何更新BLOB列...謝謝...
您不能發出SQL語句“update ... for update”。 只需刪除尾隨的“for update”,您的陳述即可。
由於您沒有告訴我們uname
的內容,因此您的陳述當然也可能存在其他問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.