按照,分割字段,形成多行数据

SELECT a1, a2
FROM (SELECT a1,
SUBSTR (
a2,
INSTR (',' || a2 || ',', ',', 1, t2.row_num),
INSTR (',' || a2 || ',', ',', 1, t2.row_num + 1)
- 1
- INSTR (',' || a2, ',', 1, t2.row_num)
) a2
FROM testa, (SELECT ROWNUM row_num
FROM user_objects
WHERE ROWNUM <= 10) t2)
WHERE a2 IS NOT NULL
ORDER BY a1

上一篇:python+selenium打开百度搜索


下一篇:Oracle中字符串截取最全方法总结