select a.id,a.name,b.mingcheng,c.mingcheng,d.mingcheng
from
students a,
zhengshu b,
zhengshu c,
zhengshu d
where
a.zhengshu1=b.bianhao and
a.zhengshu1=c.bianhao and
a.zhengshu1=d.bianhao and
from
students a,
zhengshu b,
zhengshu c,
zhengshu d
where
a.zhengshu1=b.bianhao and
a.zhengshu1=c.bianhao and
a.zhengshu1=d.bianhao and
from
students a,
zhengshu b,
zhengshu c,
zhengshu d
where
a.zhengshu1=b.bianhao and
a.zhengshu2=c.bianhao and
a.zhengshu3=d.bianhao and
where t1.zhengshu1=t21.bianhao(+)
and t1.zhengshu2=t22.bianhao(+)
and t1.zhengshu3=t23.bianhao(+);
from
students a,
zhengshu b,
zhengshu c,
zhengshu d
where
a.zhengshu1=b.bianhao and
a.zhengshu2=c.bianhao and
a.zhengshu3=d.bianhao;
(select B.mingcheng from zhengshu B where A.zhengshu1 = B.bianhao) as 证书1,
(select B.mingcheng from zhengshu B where A.zhengshu2 = B.bianhao) as 证书2,
(select B.mingcheng from zhengshu B where A.zhengshu3 = B.bianhao) as 证书3
from students A
where (A.id = var)没有试验,你试试好了
select a.id,a.name,b.mingcheng as mingcheng1,c.mingcheng as mingcheng2,d.mingcheng as mingcheng3
from
students a,
zhengshu b,
zhengshu c,
zhengshu d
where
a.zhengshu1=b.bianhao and
a.zhengshu2=c.bianhao and
a.zhengshu3=d.bianhao;
这样就好了。
好的,谢谢各位高手相助!