--提取列值中2个固定字符的值
select substr(kcmc,instr(kcmc,'[')+1,instr(kcmc,']')-2) from cjb_gxgsyssj
--提取列值中某个固定字符后所有的值
select substr(kcmc,instr(kcmc,']')+1,length(kcmc)-instr(kcmc,']')) khfs from cjb_gxgsyssj
update cjb_gxgsyssj2 a set a.kcmc=substr(kcmc,instr(kcmc,']')+1,length(kcmc)-instr(kcmc,']'));
---提取选课课号固定字符后所有值
select xkkh, substr(xkkh,instr(xkkh,'-',-1)+1,length(xkkh)-instr(xkkh,'-',-1)) kcxh from xxkjxrwb