扫码关注官方订阅号
字段里面的信息
2014-7-4 14:25:06
数据表里有很多条数据,要找出时间在12:30:15到14:30:21的所有字段
求完整sql语句
ringa_lee
select * from table where CAST(field as time) > CAST('12:30:15' as time) and CAST(field as time) < CAST('14:30:21' as time)
oracle中的写法,首先要求是你的字段名field_name需要是date类型,不是的话自己转一下
select * from table where to_date(to_char(field_name,'hh24:mi:ss'),'hh24:mi:ss') between to_date('12:30:15','hh24:mi:ss') and to_date('14:30:21','hh24:mi:ss')
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
oracle中的写法,首先要求是你的字段名field_name需要是date类型,不是的话自己转一下