这个表设计的有问题啊。不过你可以这样做,性能不敢保证了 declare @t table(cid int, Ccoten varchar(100)) insert into @t select 1,'xiaowang' insert into @t select 2,'10001' insert into @t select 3,'m' insert into @t select 4,'xiaolv' insert into @t select 5,'10002' insert into @t select 6,'f' select n.Ccoten name,b.Ccoten id,x.Ccoten from (select * from @t where cid%3=1) n join (select cid-1 cid,Ccoten from @t where cid%3=2) b on n.cid=b.cid join (select cid-2 cid,Ccoten from @t where cid%3=0) x on n.cid=x.cid