oracle数据库:
select 系别,专业,班级,所属教师
from
(
select dence_rank()over(partition by 系别,专业 order by 班级)rownum,
系别,专业,班级,所属教师
from 表
)
where rownum<3;
delete YourTable
where [id] not in (
select max([id]) from YourTable
group by (name + value))
先查出重复记录,然后再过滤重复记录,
好像有一个选项distinct的,你试试,我现在没有SQL了
select distinct 系别,专业,班级,所属教师 from table