• SQL Server select count(distinct *)


    测试表:student

    select * from studnet;

    image

    select count(distinct name) from student;
    image
    select count(distinct *) from student;

    image

    这样是有错误的,可以变通的实现
    select count(*) 
    from
    (select distinct * from student) st;

    image

    此路不通,我走另一条路!

  • 相关阅读:
    HDU4366 Successor 线段树+预处理
    POJ2823 Sliding Window 单调队列
    HDU寻找最大值 递推求连续区间
    UVA846 Steps 二分查找
    HDU3415 Max Sum of MaxKsubsequence 单调队列
    HDU时间挑战 树状数组
    UVA10168 Summation of Four Primes 哥德巴赫猜想
    UESTC我要长高 DP优化
    HDUChess 递推
    HDU4362 Dragon Ball DP+优化
  • 原文地址:https://www.cnblogs.com/cnmarkao/p/4157961.html
Copyright © 2020-2023  润新知