理论上应该不会出现你说的结果可以加一个Distinct
select Distinct a.sn, b.name, a.price from A a, B b where a.code = b.code