update template
set activedate=(SELECT unique activedate
from template
where status = 'Draft'
and activedate like '%01-JAN-99%')
where status = 'Draft'
and activedate not like '%01-JAN-99%;
當我使用上面的語句時,日期更新爲由JDBC前端更新的01-JAN-2099。 但是,當我使用下面的查詢而不是在oracle sql中更新日期列的行爲不正常
update template
set activedate = '01JAN-99'
where status = 'Draft'
and activedate not like '%01-JAN-99%;
可能有人解釋爲什麼會出現這種情況?
什麼activedate列的數據類型? – Boneist
你想做什麼? – Moudiz
'LIKE'用於字符串值,**不**用於日期 –