JC_Lives
asked on
SQL Server count function
Hi experts,
I can't tell the difference between these two selects, could you help me understand why they would behave differently?
1. select process_Step, loan_status, count(acct#) from LMDev.dbo.sd10_View_Stagin g group by process_step, loan_status
2. select process_Step, loan_status, count(*) from LMDev.dbo.sd10_View_Stagin g group by process_step, loan_status
Thanks!
I can't tell the difference between these two selects, could you help me understand why they would behave differently?
1. select process_Step, loan_status, count(acct#) from LMDev.dbo.sd10_View_Stagin
2. select process_Step, loan_status, count(*) from LMDev.dbo.sd10_View_Stagin
Thanks!
the first count one column, the second count the entire table
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cool! Thanks!