ڶ༶ϵ
ͨһsj_idѯԼ¼ϼ
Լ
ݽṹ
huiyuan Ա
ݽṹͼ
![](/UpFile/201812/2018121466497485.jpg)
sql£
UnionӲѯ Ƕײѯ
¼м¼Լ
select id,xm,hyjb_id from huiyuan where sj_id in (select id from huiyuan where sj_id=1) Union
select id,xm,hyjb_id from huiyuan where sj_id=1 Union
select id,xm,hyjb_id from huiyuan where sj_id in (select id from huiyuan where sj_id in (select id from huiyuan where sj_id=1))
Union select id,xm,hyjb_id from huiyuan where sj_id in (select id from huiyuan where sj_id in (select id from huiyuan where sj_id in (select id from huiyuan where sj_id=1)))
Union select id,xm,hyjb_id from huiyuan where sj_id in (select id from huiyuan where sj_id in (select id from huiyuan where sj_id in (select id from huiyuan where sj_id in (select id from huiyuan where sj_id=1))))
union select id,xm,hyjb_id from huiyuan where id=1
ӶԱ֤ݵԺΨһ
ϼм¼Լ
select id,xm,hyjb_id from huiyuan where id= (select sj_id from huiyuan where id=250) Union
select id,xm,hyjb_id from huiyuan where id=250 Union
select id,xm,hyjb_id from huiyuan where id= (select sj_id from huiyuan where id= (select sj_id from huiyuan where id=250))
Union select id,xm,hyjb_id from huiyuan where id= (select sj_id from huiyuan where id= (select sj_id from huiyuan where id= (select sj_id from huiyuan where id=250)))
Union select id,xm,hyjb_id from huiyuan where id= (select sj_id from huiyuan where id= (select sj_id from huiyuan where id= (select sj_id from huiyuan where id=(select sj_id from huiyuan where id=250))))
Union select id,xm,hyjb_id from huiyuan where id= (select sj_id from huiyuan where id= (select sj_id from huiyuan where id= (select sj_id from huiyuan where id=(select sj_id from huiyuan where id=(select sj_id from huiyuan where id=250)))))
union select id,xm,hyjb_id from huiyuan where id=250
йϵͼ
select * from hygxb where hy_gx_id in (select hy_gx_id from hygxb where hyjb_id>5 and hy_id=224 Union select hy_gx_id from hygxb where hy_gx_id=224 and hy_id=22) and hy_id<>224
delete from hygxb where hy_gx_id in (select hy_gx_id from hygxb where hyjb_id>"&yl_hyjb_id&" and hy_id="&hy_id&" Union select hy_gx_id from hygxb where hy_gx_id="&hy_id&" and hy_id="&yl_sj_id&") and hy_id<>"&hy_id&""