Computer AwarenessVery hardIBPS SO IT · SBI PO
A table CUSTOMER has 6 rows; the Phone column is NULL in 2 of them. What do COUNT(*) and COUNT(Phone) return?
- A. 6 and 6
- B. 4 and 4
- C. 6 and 4
- D. 4 and 6
Correct answer: C. 6 and 4
COUNT(*) counts every row, including those with NULLs, so it gives 6; COUNT(column) ignores NULL values, so COUNT(Phone) gives 4.
हिंदी में
CUSTOMER तालिका में 6 पंक्तियाँ हैं; उनमें से 2 में Phone स्तंभ NULL है। COUNT(*) और COUNT(Phone) क्या लौटाते हैं?
- A. 6 और 6
- B. 4 और 4
- C. 6 और 4
- D. 4 और 6
उत्तर: C. COUNT(*) NULL वाली पंक्तियों सहित प्रत्येक पंक्ति गिनता है, इसलिए 6 देता है; COUNT(column) NULL मानों की उपेक्षा करता है, इसलिए COUNT(Phone) 4 देता है।
More Computer Awareness questions
- A bank allows joint accounts: one customer may hold several accounts, and one account may belong to several customers. What is the…
- In an ER model, the entity DEPENDENT (an employee's family member) cannot be uniquely identified without the EMPLOYEE it belongs to. What…
- A database administrator moves a table to a faster disk and adds a new index. Neither the logical schema nor any application program has…
- Assertion (A): Creating an index on a column makes searches on that column faster. Reason (R): Every INSERT or UPDATE on the table must…
- How many of these statements are correct? I. A table can have only one primary key. II. A primary key column can never hold NULL. III. A…
- Two ATMs read a joint account's balance of ₹10,000 at the same moment. Each pays out ₹3,000 and writes back its own result. With no…