Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
291 Which statement about CHAR and VARCHAR is correct?
Explanation
- CHAR is fixed-length and VARCHAR is variable-length.
- For short fixed codes CHAR can be efficient, while VARCHAR suits varied text.
Last verified on 27-11-2026
292 Which data type is best for storing a percentage such as 87.5?
Explanation
- DECIMAL(5,2) stores a decimal percentage exactly.
- INT would lose the fractional part.
Last verified on 27-11-2026
293 If a table has a PRIMARY KEY on StudentID, what happens on inserting a second row with the same StudentID?
Explanation
- A duplicate primary key value violates uniqueness and the insert is rejected.
- The existing row is unchanged.
Last verified on 27-11-2026
294 Which constraint would prevent storing a negative quantity in an Orders table?
Explanation
- CHECK (Quantity >= 0) rejects negative quantities.
- DEFAULT only supplies a value when none is given and does not block negatives.
Last verified on 27-11-2026
295 What does NULL mean in a database?
Explanation
- NULL means the value is missing or unknown, not zero or empty.
- It represents the absence of a value.
Last verified on 27-11-2026
296 Is NULL equal to zero?
Explanation
- NULL is not equal to zero; it means no value is known.
- Any comparison with NULL gives UNKNOWN, not true or false.
Last verified on 27-11-2026
297 What is the result of NULL + 10 in SQL?
Explanation
- Any arithmetic with NULL yields NULL.
- Because the missing value makes the result unknown.
Last verified on 27-11-2026
298 What does the expression NULL = NULL return in SQL?
Explanation
- NULL = NULL evaluates to UNKNOWN, not TRUE.
- Use IS NULL to test for NULL instead of =.
Last verified on 27-11-2026
299 Which operator correctly tests whether a column contains NULL?
Explanation
- IS NULL is the correct test for a missing value.
- The = operator cannot match NULL because NULL is not equal to anything.
Last verified on 27-11-2026
300 Which clause finds employees whose phone number is missing?
Explanation
- WHERE Phone IS NULL selects rows with a missing phone number.
- An empty string and zero are real values, not NULL.
Last verified on 27-11-2026