mysq截取字符串

select left(ds.start_time,7) as monthss,ds.start_time
from debug_stock ds  用left,正确

select substring(ds.start_time,0,6) as monthss,ds.start_time
from debug_stock ds,不报错,但是monthss为空

posted @ 2015-10-23 11:51  longtengdama  阅读(189)  评论(0编辑  收藏  举报