我想根据自动获得时间的字段查询该怎么写语句呢?
时间字段类型,设计的是blob
select image from oldImage where id = '2' and imagetime like '%2010-12-2 9:51:01%'
这条语句什么也查不出来,但是字段image是有图片数据的呀
时间字段类型,设计的是blob
select image from oldImage where id = '2' and imagetime like '%2010-12-2 9:51:01%'
这条语句什么也查不出来,但是字段image是有图片数据的呀
select count(*) from oldImage where id = '2' and imagetime like '%2010-12-2 9:51:01%'
--这样的结果是多少
时间字段是date
select count(*) from oldImage
where id = '2' and imagetime=to_date('2010-12-02 09:51:01','yyyy-mm-dd hh24:mi:ss')
select image from oldImage where id = '2' and To_char(imagetime,'MM-DD-YYYY:HH:MM:SS') = '12-02-2010:09:51:01'