It’s too easy.用not exists和not in都可以判断. /***************************************************/ 铁的承诺,风的回忆. 永远的亚特兰蒂斯,永远的炎龙骑士团. /***************************************************/
用外连接select a.*, b.* from only_one_class a full outer join test_cj5_2 b on a.P_ID=b.P_ID where a.P_ID is null or b.P_ID is null如果是Oracle, Oracle的那个外连接是什么运算符来着? 呵呵
only_one_class比test_cj5_2多的p_id: select p_id from only_one_class where not exists (select * from test_cj5_2 where test_cj5_2.p_id=only_one_class.p_id)test_cj5_2比only_one_class多的p_id: select p_id from test_cj5_2 where not exists (select * from only_one_class where test_cj5_2.p_id=only_one_class.p_id)
It’s too easy.用not exists和not in都可以判断.
/***************************************************/
铁的承诺,风的回忆.
永远的亚特兰蒂斯,永远的炎龙骑士团.
/***************************************************/
from only_one_class a
full outer join
test_cj5_2 b
on a.P_ID=b.P_ID
where a.P_ID is null or b.P_ID is null如果是Oracle, Oracle的那个外连接是什么运算符来着? 呵呵
select p_id from only_one_class
where not exists (select * from test_cj5_2 where test_cj5_2.p_id=only_one_class.p_id)test_cj5_2比only_one_class多的p_id:
select p_id from test_cj5_2
where not exists (select * from only_one_class where test_cj5_2.p_id=only_one_class.p_id)