a表
idb表
id
equimentid现在我想找到b表中equimentid=c119的ID与a表中ID相同的集合,下面的是我写的.在SQL2000里面老是说where 附近有语法错误.请帮忙!select a.id from a , (select b.id from b where b.equimentid = 'C119') where a.id = b.id
idb表
id
equimentid现在我想找到b表中equimentid=c119的ID与a表中ID相同的集合,下面的是我写的.在SQL2000里面老是说where 附近有语法错误.请帮忙!select a.id from a , (select b.id from b where b.equimentid = 'C119') where a.id = b.id
From b
Where equimentid ='C119' and id in (Select id From a)
这样就行了,!
select b.id,b.equimentid from b,a where a.id=b.id and b.equimentid='cll9'
去试一下吧,偶没试,但偶认为这样也行的!