select id,name,substr(dept,1,2) from test;
select
id,
name
,substr(dept,1,2)
from
test;
提取字段dept前两位
substr(string,start,length)