--截取字符串左边3个字符-- select LEFT('Welcome to China!',7) as 结果1 --截取字符串右边4个字符-- select RIGHT('Welcome to China!',6) as 结果2 --截取字符串中间6个字符(第二个从哪个字符下标开始) select SUBSTRING('Welcome to China!',9,2) as 结果3
实例结果: