select t1,t2,a t3 from tablename
union all
select t1,t2,b t3 from tablename
union all
select t1,t2,c t3 from tablename

解决方案 »

  1.   

    少了一列,是这样
    select t1,t2,'a' t3,a t4 from tablename
    union all
    select t1,t2,'b' t3,b t4 from tablename
    union all
    select t1,t2,'c' t3,c t4 from tablename
      

  2.   

    oracle只有一种旋转插入的语法的,旋转查询倒没有听过insert All
      Into 表名  values (公用字段,字段1)
      ......
      Into 表名  values (公用字段,字段n)
    select 公用字段,字段1,...字段n
    from 表名;