日期:2014-05-19  浏览次数:20435 次

请大家看看这段sql代码错在哪里?
select   d.*   from   table1   d   inner   join   (select   *   from   (select   a.idcard   from   table1   a   inner   join     @idcardtable   b   on   a.idcard=b.idcard   and   groupid=2)   c)   on   c.idcard=d.idcard

------解决方案--------------------
select d.* from table1 d inner join (select a.idcard from table1 a inner join @idcardtable b on a.idcard=b.idcard and groupid=2) c on c.idcard=d.idcard