select a.name,b.name,a.fields
from (select o.name,c.name as fields
from sysobjects o
inner Join syscolumns c on o.id=c.id
Where o.name ='表一') a
inner join (select o.name,c.name as fields
from sysobjects o
inner Join syscolumns c on o.id=c.id
Where o.name ='表二') b
on a.fields=b.fields
--看看这样是不是你要的结果