下面是我在SQL*PLUS中的sql语句,我在BS表中查找BEGINTIME时,明明有23:00 和22:00两个字段,
但是我又select * from BS where BEGINTIME='23:00'确没有记录,这是怎么回事啊,郁闷死了,真的不知道出错在哪了,大家帮忙看看吧SQL> select BEGINTIME from BS;BEGINTIME
---------------------
23:00
23:00
23:00
22:00
22:00
22:00
23:00
23:00
23:00
23:00
23:00BEGINTIME
---------------------
23:00
23:00
23:00
23:00
23:00
23:00
23:0018 rows selected.SQL> select * from BS where BEGINTIME='23:00'
2 ;no rows selected
但是我又select * from BS where BEGINTIME='23:00'确没有记录,这是怎么回事啊,郁闷死了,真的不知道出错在哪了,大家帮忙看看吧SQL> select BEGINTIME from BS;BEGINTIME
---------------------
23:00
23:00
23:00
22:00
22:00
22:00
23:00
23:00
23:00
23:00
23:00BEGINTIME
---------------------
23:00
23:00
23:00
23:00
23:00
23:00
23:0018 rows selected.SQL> select * from BS where BEGINTIME='23:00'
2 ;no rows selected
'23:00'这个字段好象不是这么写的吧.....你的BEGINTIME是什么类型的字段呢....
select * from BS where BEGINTIME='%23:00%'
用select * from BS where BEGINTIME like '%23:00%'
可以查询成功了
现在我想查询
select * from BS where BEGINTIME between 23:00 and 24:00
那要怎么实现阿,按照我刚写的语句肯定实现不了再次谢谢大家了