请大家看看这段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