当前位置:网站首页>SQL语言中的distinct说明
SQL语言中的distinct说明
2022-08-09 08:56:00 【l8487】
对整个select 来说的话.前面加一个distinct表示把重复的记录去掉的意思, 找出表中不重复的记录。
id name
1 张三
2 王三
3 李四
4 张三
2 王三
select distinct id,name from t1
id name
1 张三
2 王三
3 李四
4 张三
select distinct name from t1
name
张三
王三
李四
id name
1 张三
2 王三
3 李四
4 张三
2 王三
select distinct id,name from t1
id name
1 张三
2 王三
3 李四
4 张三
select distinct name from t1
name
张三
王三
李四
边栏推荐
猜你喜欢
随机推荐
makefile的foreach、filter、filter-out函数
Makefile中patsubst、wildcard、notdir的使用
nyoj306 走迷宫(搜索+二分)
Some of the topics in VNCTF2021 are reproduced
Makefile中的%标记和系统通配符*的区别
[V&N2020 Open] Memory Forensics
uva11624 Fire! (双bfs)
Redis缓存设计
微信小程序获取用户收货地址列表wx.chooseAddress
【CNN】2022 ECCV Oral 自反馈学习的mixup训练框架AutoMix
The difference between big-endian and little-endian storage is easy to understand at a glance
[Vulnerability reproduction] CVE-2018-12613 (remote file inclusion)
leetcode 32. 最长有效括号 (困难)
无符号整数文法和浮点数文法
探索APP性能优化之稳定性优化(解决方案)
大学四年不努力,出社会后浑浑噩噩深感无力,辞去工作,从头开始
VNCTF2021 部分题目复现
makefile - 学习小结
零搜索量的关键词,你需要布局吗?
MySQL创建索引的技巧