Computer AwarenessHardIBPS SO IT Officer
A query must list the customers who have no phone number recorded (the Phone column is NULL). Which condition works?
- A. WHERE Phone = NULL
- B. WHERE Phone = ''
- C. WHERE Phone IS NULL
- D. WHERE Phone = 0
Correct answer: C. WHERE Phone IS NULL
Any comparison with NULL using = yields UNKNOWN, so 'Phone = NULL' returns no rows; IS NULL is the correct test. An empty string or 0 is a real value, not NULL.
हिंदी में
एक क्वेरी को उन ग्राहकों की सूची बनानी है जिनका कोई फ़ोन नंबर दर्ज नहीं है (Phone स्तंभ NULL है)। कौन-सी शर्त काम करती है?
- A. WHERE Phone = NULL
- B. WHERE Phone = ''
- C. WHERE Phone IS NULL
- D. WHERE Phone = 0
उत्तर: C. = से NULL की किसी भी तुलना का परिणाम UNKNOWN होता है, इसलिए ‘Phone = NULL’ कोई पंक्ति नहीं लौटाता; IS NULL सही परीक्षण है। रिक्त स्ट्रिंग या 0 वास्तविक मान हैं, NULL नहीं।
More Computer Awareness questions
- A City column holds Delhi, Pune, Delhi, NULL, Pune, NULL in six rows. What does SELECT COUNT(DISTINCT City) return?
- A transaction runs: INSERT row 1; SAVEPOINT s1; INSERT row 2; ROLLBACK TO s1; COMMIT. Which of the inserted rows are in the table…
- A transfer debits Account A, but the system crashes before Account B is credited. On restart, the debit is undone, so it is as if the…
- Two transactions run at the same time on the same accounts, yet the final result is the same as if one had run fully before the other…
- A database stores records as a tree in which every child record has exactly one parent, as in a company → department → employee chart…
- In the three-schema (ANSI/SPARC) architecture, the part of the database that one user group sees, such as the loan officers' view, is…