delect from table
where
id not in (select id from table group by a,b,c....)group by 后面所根字段就是用来判断相同,如上就是当a,b,c,..全部相同时才认为是相同,如果group by a,那么只要A相同就认为记录相同。ID是表的唯一性的列就可以了。
where
id not in (select id from table group by a,b,c....)group by 后面所根字段就是用来判断相同,如上就是当a,b,c,..全部相同时才认为是相同,如果group by a,那么只要A相同就认为记录相同。ID是表的唯一性的列就可以了。
delect from table
where
id not in (select MAX(id) from table group by a,b,c....)group by 后面所根字段就是用来判断相同,如上就是当a,b,c,..全部相同时才认为是相同,如果group by a,那么只要A相同就认为记录相同。ID是表的唯一性的列就可以了。