dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Introducing the APPROX_COUNT_DISTINCT SQL Function

Learn how to return the approximate number of unique non-null values in a group.


advertisement

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


The APPROX_COUNT_DISTINCT SQL Function became available with SQL Server 2019 Community Technical Preview (CTP) 2.0.

APPROX_COUNT_DISTINCT returns the approximate number of unique non-null values in a group.

This example returns the approximate number of different student keys from the Students table:

SELECT APPROX_COUNT_DISTINCT(StudentKey) AS [Example1]
FROM Students

 

Visit the DevX Tip Bank

 





   
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Thanks for your registration, follow us on our social networks to keep up-to-date