首页 >> 综合 >

sql去重函数(sql去重)

2023-08-01 08:56:07 来源: 用户: 

大家好,我是小夏,我来为大家解答以上问题。sql去重函数,sql去重很多人还不知道,现在让我们一起来看看吧!

1、对想要去除重复的列使用 group by 函数即可。

2、可以使用:select * from test group by tel;

3、这是最简单的一种情况,用关键字distinct就可以去掉

4、example: select distinct * from table(表名) where (条件)

5、CREATE TABLE 临时表 AS (select distinct * from 表名);

6、     drop table 正式表;

7、     insert into 正式表 (select * from 临时表);

8、    drop table 临时表;

本文到此讲解完毕了,希望对大家有帮助。

  免责声明:本文由用户上传,与本网站立场无关。财经信息仅供读者参考,并不构成投资建议。投资者据此操作,风险自担。 如有侵权请联系删除!

 
分享:
最新文章