如上所示,同一段sql语句封装到存储过程后 执行结果就不一样了,,,求指点,,

解决方案 »

  1.   

    注意数据类型。create procedure updateDishPerHourReport(_lastUpdateDishRecordTime date, _guid varchar(1000))
    begin
      

  2.   

    10.3. Date and Time Types
    The date and time types for representing temporal values are DATETIME, DATE, TIMESTAMP, TIME, and YEAR. Each temporal type has a range of legal values, as well as a “zero” value that may be used when you specify an illegal value that MySQL cannot represent. The TIMESTAMP type has special automatic updating behavior, described later on. For temporal type storage requirements, see Section 10.5, “Data Type Storage Requirements”. 
      

  3.   

     DATETIME  和 DATE 是俩种类型date会把'2014-05-21 17:00:00' 截取为'2014-05-21,