表如下:
a b
11 12
14 14
16 21查询后将a列和b列并成新表的一列
new
11
12
14
14
16
21
不要查询两次
select a as new from table
union all
select b from table不要这样的结构,只要查询一次的语句,谢谢。
a b
11 12
14 14
16 21查询后将a列和b列并成新表的一列
new
11
12
14
14
16
21
不要查询两次
select a as new from table
union all
select b from table不要这样的结构,只要查询一次的语句,谢谢。
from table1 t1 full join table1 t2
on 1=2
union
select b as new from table
INTO NEW VALUES(a)
INTO NEW VALUES(b)
SELECT a, b FROM OLD;
from t t1 join in t
on t.a=t1.a;