Last answered:

28 Aug 2023

Posted on:

27 Aug 2023

0

Resolved: difference between 2 codes

Select count(salary)
   from salaries
   where salary >= 100000

is similar to 

Select count(*)
   from salaries
   where salary >= 100000

?

1 answers ( 1 marked as helpful)
Instructor
Posted on:

28 Aug 2023

0

Hi Fatma!
Thanks for reaching out.

Yes, both codes give the same result set. Since there are no NULL values, it does not matter what column you will provide to the COUNT() function.


Hope this helps.
Best,
Tsvetelin

Submit an answer