access中,有个表stn,有id,name,addr,birthdy.

2025-12-16 21:42:58
推荐回答(1个)
回答1:

这样
SELECT top 10 *
FROM stn
where datediff('d',[birthdy],'1982-10-10')<0 and id_ not in (select top 5 id_ from stn where datediff('d',[birthdy],'1982-10-10')<0 order by birthdy)
order by birthdy

这样出来的结果出来会有重复的,所以结果集数据会大于10条,你可以再distinct一下就好了