需要将以逗号分割的字符串,拆分出各个元素,然后进行相应的处理,类似对象数据库的功能。
select to_number(regexp_substr('623,323,423','[^,]+',1,rownum,'i')) as staff_id from dual connect by rownum<=length('623,323,423')-length(replace('623,323,423',',',''))+1
返回值为
623
323
423
需要将以逗号分割的字符串,拆分出各个元素,然后进行相应的处理,类似对象数据库的功能。
select to_number(regexp_substr('623,323,423','[^,]+',1,rownum,'i')) as staff_id from dual connect by rownum<=length('623,323,423')-length(replace('623,323,423',',',''))+1
返回值为
623
323
423