首页 > 数据库技术 > 详细

mysql中取系统当前时间

时间:2015-09-23 21:06:40      阅读:321      评论:0      收藏:0      [点我收藏+]
<select id="getFreightEfclInventoryList" parameterType="long" resultMap="BaseResultMap1">
  SELECT
  freight_efcl_inventory_id,
  freight_efcl_id,
  closing_date,
  sailing_date,
  shipping_space_total,
  shipping_space_remain,
  shipping_space_used
  FROM
  freight_efcl_inventory
  WHERE
  1=1
  AND freight_efcl_id=#{freightEfclId}
  AND sailing_date >= DATE(current_timestamp)
  ORDER BY
  sailing_date ASC
  limit 4
  </select>

 注意:sailing_date字段类型是Date类型,系统当前时间current_timestamp时间格式带时分秒的,所以需要将其转换成Date类型。

 

mysql中取系统当前时间

原文:http://www.cnblogs.com/vanl/p/4833312.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!