leetcode数据库类型:196.删除重复的电子邮箱,难度:简单


解答:

我们可以使用delete和where子句,首先将此表与它自身在电子邮箱列连接起来:

然后我们需要找到其他记录中具有相同电子邮箱地址的更大ID,所以我们可以给where子句添加一个条件:

因为我们已经得到了要删除的记录,所以我们最终可以将该语句更改为delete:

leetcode数据库类型:196.删除重复的电子邮箱,难度:简单
解答:
我们可以使用delete和where子句,首先将此表与它自身在电子邮箱列连接起来:
然后我们需要找到其他记录中具有相同电子邮箱地址的更大ID,所以我们可以给where子句添加一个条件:
因为我们已经得到了要删除的记录,所以我们最终可以将该语句更改为delete:
本文标题:leetcode数据库类型:196.删除重复的电子邮箱,难度:简
本文链接:https://www.haomeiwen.com/subject/ztkuortx.html
网友评论