如果是主外建的话用连接
select a.*, b.*
from a, b
where a.x='id' and b.y='password' and a.主健 = b.外键如果没什么关系的话,至少两张表的字段的类型是可以相互转换的,
而且个数要相同,或者选出来的字段的个数相同
select field1, field2, ...
from a
where a.x='id'
union all
select filed1, field2
from b
where b.y='password'
如果不要重复字段,可以去掉all
select a.*, b.*
from a, b
where a.x='id' and b.y='password' and a.主健 = b.外键如果没什么关系的话,至少两张表的字段的类型是可以相互转换的,
而且个数要相同,或者选出来的字段的个数相同
select field1, field2, ...
from a
where a.x='id'
union all
select filed1, field2
from b
where b.y='password'
如果不要重复字段,可以去掉all
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货