求2表合并的sql语句
表A:
no data
1 a
2 b
3 c
表B:
no data flag
4 d 1
5 e 1
合并成表C:
no data flag
1 a null
2 b null
3 c null
4 d 1
5 e 1
求sql语句,谢谢!!!
[解决办法]
select no,data,null as flag from a
union all
select no,data,flag from b
[解决办法]
select no, data, flag=null from A
union all
select no, data, flag from B