在实际工作中,有时候会遇到提取sql查询出来的字段中括号里面的码值,比如:
我现在要提取student表的sname中括号里面的字段
解决方法如下:
select sname,replace(substr(sname, instr(sname, '[',1)+1),']','') from student;
成功提取!!!
在实际工作中,有时候会遇到提取sql查询出来的字段中括号里面的码值,比如:
我现在要提取student表的sname中括号里面的字段
解决方法如下:
select sname,replace(substr(sname, instr(sname, '[',1)+1),']','') from student;
成功提取!!!