日期:2014-05-16 浏览次数:21361 次
create table test1( id number primary key, name1 varchar2(20), t_test2_id number foreign key--------指向test2 ) create table test2( id number primary key, name2 varchar2(20), t_test3_id number foreign key--------指向test3 ) create table test3( id number primary key, name3 varchar2(20) )
select t1.id,t1.name1,t2.name2,t3.name3 from test1 t1,test2 t2,test3,t3 where t1.t_test2_id = t2.id and t2.t_test3_id = t3.id and t2.id not in(1,3,5,7,9,10);