首页 > 技术文章 > mysq截取字符串

longsanshi 2015-10-23 11:51 原文

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为空

推荐阅读