赞
踩
SELECT id,name FROM t1
UNION ALL
SELECT id,name FROM t2
SELECT id,name FROM t1
UNION
SELECT id,name FROM t2
SELECT * FROM t1
INNER JOIN t2 ON t1.id=t2.id
SELECT t1.id AS t1_id,t2.id AS t2_id FROM t1
LEFT JOIN t2 ON t1.id=t2.id
WHERE t2.id IS NULL;
SELECT t1.id AS t1_id,t2.id AS t2_id FROM
(
SELECT id FROM `data_make_certificate_apply` WHERE `deleted`=0 GROUP BY batch_no
) t1
RIGHT JOIN
(
SELECT id FROM `data_make_certificate_apply` WHERE `deleted`=0 GROUP BY batch_no,competition_item,saiqu
) t2
ON t1.id=t2.id
WHERE t1.id IS NULL;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。