表t1
a b
01 c1
02 c2
表t2
a b
a1 c1
b1 c2
表t3
e f
c1 真的/好
c2 真的/坏
下面这条语句好像不行啊,把好、坏记录都选出来了,我只想选为"好"的记录啊
select * from (select a,b,f from t1,t3 where t1.b=t3.f union select a,b,f from t2 ,t3 where t2.b=t3.f) a,t3 where t3 like "%好%"
a b
01 c1
02 c2
表t2
a b
a1 c1
b1 c2
表t3
e f
c1 真的/好
c2 真的/坏
下面这条语句好像不行啊,把好、坏记录都选出来了,我只想选为"好"的记录啊
select * from (select a,b,f from t1,t3 where t1.b=t3.f union select a,b,f from t2 ,t3 where t2.b=t3.f) a,t3 where t3 like "%好%"
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货