select a.teamid as teamA_id,a.teamname as teamA_name,
b.teamid as teamB_id,b.teamname as teamB_name
from 一张表 a,一张表 b
where (select count(*) from 一张表 where teamid<=a.teamid) % 2 =1
and (select count(*) from 一张表 where teamid<=b.teamid) =(select count(*) from 一张表 where teamid<=a.teamid)+1
order by a.teamid
select a.teamid as teamA_id,a.teamname as teamA_name,
b.teamid as teamB_id,b.teamname as teamB_name
from 一张表 a,一张表 b
where a.teamid % 2 =1
and b.teamid =a.teamid+1