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'用于字符串值,**不**用于日期 –