用一條修改語句即可:update t_content set f_body=rawtohex(f_check) where f_type in (0,4)
此處須用rawtohex()函數(shù)將f_check轉(zhuǎn)成16進(jìn)制,不然會報ORA-01465: invalid hex number(ORA-01465:無效的十六進(jìn)制數(shù)字)的錯誤.
備注:f_body為blob型字段,f_check為varchar2型
這時在頁面取 f_body時直接用getString("f_body")即可.