• +91 9723535972
  • info@interviewmaterial.com

MS SQL Interview Questions and Answers

Question - What’s the logical difference, if any, between the following SQL expressions?

Answer -

-- Statement 1 
SELECT COUNT ( * ) FROM Employees

-- Statement 2
SELECT SUM ( 1 ) FROM Employees
They’re the same unless table Employee table is empty, in which case the first yields a one-column, a one-row table containing zero, and the second yields a one-column, one-row table "containing a null."

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners