select * from gzyexam_c.dbo.AnswerSheetDetail where AnswerSheetID in ( select AnswerSheetID from ( select AnswerSheetID,rownum from ( select a.AnswerSheetID, ROW_NUMBER() over (order by a.AnswerSheetID) as rownum from ( select distinct AnswerSheetID from gzyexam_c.dbo.AnswerSheetDetail ) a ) b where rownum between 1 and 20 ) c )
这里容器指 AnswerSheetID
元素指 AnswerSheetDetail。
一个AnswerSheetID对应多个AnswerSheetDetail。