COUNT of DISTINCT Rows in SQL Server






3.50/5 (3 votes)
Nice tip :)But if you have any column say empid which have the unique constraint then it is better to use the following SQL queryselect count(distinct empid ) from employees
Nice tip :)
But if you have any column say empid which have the unique constraint then it is better to use the following SQL query
select count(distinct empid ) from employees