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
Software Developer (Senior)
Magic Software Pvt Ltd
I am currently working as a Analyst and have around 6 yeras of experience in database.Currently, I am working in Magic Software Pvt.Ltd.
Master Degree in Computer(MCA)
Designing of the database.
Writing Complex Stored Procedures,Functions,Triggers etc.
Designing and developing SSIS & DTS packages.
Designing SQL Reports using SSRS.
Database Server Maintenance.
Microsoft certified Sql DBA in Sql server 2008 (MCTS).
Microsoft certified BI professional in Sql server 2008 (MCTS).
Oracle certified profession DBA in ORACLE 10g (OCP)
certified profession DBA in ORACLE 9i (OCP)
My other publication
Technical Blog:- Technologies with Vivek Johari
Moderator and Blogger at BeyondRelational.com
Guest Author and Blogger at sqlservercentral.com