数据库
首页 > 数据库> > SQL3、查询结果去重

SQL3、查询结果去重

作者:互联网

思路:去除重复项需要用到关键字DISTINCT

代码解释:从表user_profile中取出 去除了重复项的列university

SELECT 
  DISTINCT university
FROM 
  user_profile;

题目:https://www.nowcoder.com/practice/82ebd89f12cf48efba0fecb392e193dd?tpId=199&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%3Fpage%3D1%26tab%3DSQL%25E7%25AF%2587%26topicId%3D199

标签:profile,从表,结果,DISTINCT,university,SQL3,查询,重复,user
来源: https://www.cnblogs.com/tiansz/p/16464498.html