DB2如何根据多个字段的值去掉重复记录?
答案:2 悬赏:40 手机版
解决时间 2021-04-01 22:35
- 提问者网友:却不属于对方
- 2021-04-01 11:13
DB2如何根据多个字段的值去掉重复记录?
最佳答案
- 五星知识达人网友:洒脱疯子
- 2021-04-01 11:42
select
min(id) id,
name,
age
from
Tab
group by
name,
age
min(id) id,
name,
age
from
Tab
group by
name,
age
全部回答
- 1楼网友:孤老序
- 2021-04-01 12:36
delete from(select *
from(select name,age1,
row_number()
over(partition by name,age1
order by name,age1)
as aa
from Tab)
where aa>1
)
from(select name,age1,
row_number()
over(partition by name,age1
order by name,age1)
as aa
from Tab)
where aa>1
)
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯