|
Method one, delete table where student number (automatic numbering) not in
(select max (student number (automatic number)) as xh, name, gender, age
from table
group by name, gender, age) A
Method Two,
delete table where student number (automatic numbering) not in (
select max (a. student number) from table B, (select distinct name, gender, age from table) A
where A. name = b.name and a.sex = b.sex and a.age = b.age
) C
The above method does not know whether it is possible, and has not been tested in SQL. |
|