select distinct为什么删除不了重复值

A黎默然 A黎默然 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我从智联招聘找了382条数据,
为什么我用Navicat写以下,可以得到379条数据:
select * from abc;
start transaction;
create table abc_new select distinct * from abc;
delete from abc;
insert into abc select * from abc_new;
drop table abc_new;
commit;


而这样写还是得到382条数据:
select * from abc;
start transaction;
select distinct * from abc;
commit;

或者这样写也是得到382条数据:
select * from abc;
start transaction;
create table abc_new select distinct * from abc;
commit;

请问我select distinct用法哪里错了?谢谢
...全文
评论 4
收藏 已收藏
分享
返回顶部
A黎默然
MS-SQL Server 34,876 成员 254,635 内容