select a01 into #tmp from A表
union all
select a02 from A表
union all
select a03 from A表
...
union all
select a10 from A表

解决方案 »

  1.   

    select a01 into #tmp from A表
    union all
    select a02 from A表
    union all
    select a03 from A表
    ...
    union all
    select a10 from A表
      

  2.   

    使用union 连接注意类型相同
      

  3.   

    select a1 into #temptable from a
    union all
    select a2 from a
    .....
    union
    select a10 from a
      

  4.   

    select a01 into #temp from A表
    union all
    select a02 from A表
    union all
    select a03 from A表
    ...
    union all
    select a10 from A表