11、删除重复记录(字段) 表中要有自动编号字段(ID),可建立删除查询或执行RunSql语句(其中[ ]填写对应的表名、重复字段名、关键字段名): Delete * FROM [表] Where DCount("[字段]","[表]","[字段]='" & [字段] & "'")>1 AND [ID]>DLookUp("[ID]","[表]","[字段]='" & [字段] & "'") or [字段] Is Null;
12、班级成绩排名查询 可根据年级、班级和不同科目替换查询中的相应字段名: Select *, [英语]+[数学]+[语文] AS 总分, DCount("*","成绩表","[年级]='" & [年级] & "' and ([英语]+[数学]+[语文])>" & [英语]+[数学]+[语文])+1 AS 年级名次 FROM 成绩表 orDER BY 成绩表.年级, [英语]+[数学]+[语文] DESC;