一、表user信息如下:
二、要求如下:
删除字段name和tel相同的记录
三、SQL编写如下:
说明:在oracle中直接使用SQL语句:delete from user where id not in (select max(id) id from user group by tel,name)即可删除重复记录,不会出现类似MySQL的1039错误信息
一、表user信息如下:
二、要求如下:
删除字段name和tel相同的记录
三、SQL编写如下:
说明:在oracle中直接使用SQL语句:delete from user where id not in (select max(id) id from user group by tel,name)即可删除重复记录,不会出现类似MySQL的1039错误信息
转载于:https://my.oschina.net/sjyroom/blog/141502