Question

1.
2.
3.
4.
Answer (Detailed Solution Below)

Option 3 : 5 and 3 / 5 और 3

Advertisement

Detailed Solution

सही उत्तर 5 and 3 / 5 और 3 है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

Attend(Sid, Status) holds (1, 'P'), (2, NULL), (3, 'A'), (4, 'P'), (5, NULL). What does SELECT COUNT(*), COUNT(Status) FROM Attend; return? / Attend(Sid, Status) में (1, 'P'), (2, NULL), (3, 'A'), (4, 'P'), (5, NULL) हैं। SELECT COUNT(*), COUNT(Status) FROM Attend; क्या लौटाएगा?

1.
3 and 3 / 3 और 3
2.
5 and 5 / 5 और 5
3.
5 and 3 / 5 और 3
4.
3 and 5 / 3 और 5

Correct Answer: 5 and 3 / 5 और 3

COUNT(*) counts rows regardless of NULLs — 5 rows. COUNT(Status) counts only non-NULL values of that column — 'P', 'A', 'P' = 3. Aggregate functions ignore NULLs (except COUNT(*)). / COUNT(*) NULL की परवाह किए बिना पंक्तियां गिनता है — 5 पंक्तियां। COUNT(Status) उस स्तंभ के केवल गैर-NULL मान गिनता है — 'P', 'A', 'P' = 3। समग्र फलन NULL की उपेक्षा करते हैं (COUNT(*) को छोड़कर)।

Downloaded from PrepSnap (prepsnap.in)