select * from tb where id in (select id from tb2 where tb2.id=@id )
------解决方案-------------------- select * from tb where id in (select id from tb2 where tb2.id=@id ) =select * from tb where id=@id =from i in tb where id==yourid select i
------解决方案-------------------- 参考 http://www.csharpwin.com/csharpspace/3899r4152.shtml
------解决方案--------------------
------解决方案-------------------- var source1=from t in tb2 where t.id=数 select t.id; var source=from temp in tb where source1.Contains(temp.id) select temp;
------解决方案-------------------- select * from tb where id in (select id from tb2 where tb2.col=@col)
Linq: from t in tb where id.contaict(from c in tb2 where tb2.col=@col) select t 手写,不知道对不对