如何将一行数据分两行输出到另一个表 比如一个表的数据是1113494,'datasoucr','figh',这其中主键是1113494将这行数据输出到另一个表成为1113494,'datasoucr'和1113494,'figh'不能写存储过程,直接用SQL来写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 存这条记录(1113494,'datasoucr','figh',)的表的格式是什么样的,几列? --这个意思?with t(col1,col2) as(select 1113494,'datasoucr,figh' from dual)select col1,regexp_substr(col2, '[^,]+',1,rownum) col2 from t connect by rownum<=length(col2)-length(replace(col2, ',', ''))+1;/* COL1 COL2 ---------- -------------------- 1113494 datasoucr 1113494 figh */ 'datasoucr','figh' 这是一列的内容还是两个列的内容,这很关键的 insert into B select col1,col2 from A;insert into B select col1,col3 from A; select 1113494,'datasoucr'from table1union all1113494,'figh'from table1 select 1113494,'datasoucr'from table1union allselect 1113494,'figh'from table1 cursor 是否可以作为参数传递 问个oracle数据恢复问题 ORA-12560: TNS: 协议适配器错误 ORA-04098: trigger 'SYSTEM.POLICYPATHTABLE_TRG' is invalid and failed re-validat oracle 动态这行sql 语句 问题 关于数据库文件 求一个求小时的SQL语句 大家看看这个语句怎么优化?谢谢! 求sql语句或一个存储过程 我的一个9 i中运行正常的SQL语句到8i 中无法执行,出错,是怎么回事啊? SCN问题求解? sql编写问题,求大虾。。。
--这个意思?
with t(col1,col2) as(
select 1113494,'datasoucr,figh' from dual
)
select col1,regexp_substr(col2, '[^,]+',1,rownum) col2
from t connect by rownum<=length(col2)-length(replace(col2, ',', ''))+1;
/*
COL1 COL2
---------- --------------------
1113494 datasoucr
1113494 figh
*/
insert into B select col1,col3 from A;
from table1
union all
1113494,'figh'
from table1
from table1
union all
select 1113494,'figh'
from table1