查询select问题
select * from a where code=等于的条件在另一个表里这个怎样写呀
2011-01-07 15:31
2011-01-07 17:29
2011-01-07 19:47
2011-01-09 22:36
select * from t1 where exists(select * from t2 where t1.code=t2.code) --where code = any (select code from t2) --where code in (select code from t2)上述三种where条件应该都可以满足楼主的要求,其中使用in语句时,效率低一些。
2011-01-10 14:07