怎样把两个select出的列合并
select paid from a
select name,payment from b
怎样合并结果集,使成为name,payment,paid这样的结果
------解决方案--------------------select null,null,paid from a
union all
select name,payment,null from b
------解决方案--------------------select name,payment,paid from a,b
------解决方案--------------------要拼成一个结果集的话,你总得告诉SQL,准备怎么关联数据
哪一个paid对应name什么的
------解决方案--------------------select name,payment,paid from a,b
这样可是要生成(select count(*) from a)*(select count(*) from b)这么多条记录哦!
10000*10000的话就一亿条了啊,慢死你