SQL语句如何截取字段中固定位置的值??答:从字符串‘abc123’的第一个字符开始截取,共截取两个字符,最后得到‘ab’。select SUBSTRING('[email protected]',1,charindex('@','[email protected]')-1)第二种:elect id, substring(str,charindex(',',str)+1,len(str)-charindex(',',str)) from test;如果中间间隔为-,则sql语句为select ...