mysqldump -h127.0.0.1 -uxxx -pxxx -B database_name --tables table_name --where '....' > a.sql
  问题在这个where 里面。我需要在where 里面调用一个函数来进行函数控制,请问要怎么样才能办到。 我说具体点吧。
 
      例如 年 , 月  , 日 在不同的字段里面,我需要连接之后在去比较。。    --where  concat(year,concat(month,day)) >= '2000-01-01 ' and concat(year,concat(month,day))<='2000-02-02' 请问我要达到这个效果,这个where应该怎么写··

解决方案 »

  1.   

    --where "year*10000+month*100+day between 20000101 and 20000202"
      

  2.   

      那我这样用 --where concat(year,concat(month,day)) >= '2000-01-01 ' and concat(year,concat(month,day))<='2000-02-02'
      为什么会出问题呢?
      

  3.   

    一月一日,不就成了200011另外,concat可以接收n个参数
    concat(a,b,c,d,e......)
      

  4.   

    楼主直接 select  concat(year,concat(month,day))  看一下是结果