mysql和orcale截取字符串的規則不太一樣
mysql:substr('2009-01-01',1,4) :2009 從1開始計數,如果寫0的話 取不出數據
orcale:substr('2009-01-01',0,4) :2009 從0開始計數。
截取字符串的另一種方法 :
left('2009-01-01',4) AS `buy_time_year1`,
mysql 連接字符串
concat函數的用法
update area set zip = concat('0',zip) where jb <>0 and name like '%山東%' and name not like '%菏澤%';