日期比较相差30天
select taxi_num,taxi_reject from taxi_info where to_days(taxi_reject) -to_days(curdate()) <30taxi_num 车号
taxi_reject 报废日期
taxi_info 车辆表
怎么不行呀。。。。我用是mysql 数据库
搜索更多相关主题的帖子:
where
----------------解决方案--------------------------------------------------------
select taxi_num,taxi_reject from taxi_info where (taxi_reject-curdate())*24*60*60 <30*24*60*60
----------------解决方案--------------------------------------------------------