Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
301 What does COUNT(*) count in a table?
Explanation
- COUNT(*) counts every row regardless of NULLs.
- COUNT(column) counts only non-NULL values in that column.
Last verified on 27-11-2026
302 Which of the following is a domain constraint?
Explanation
- Domain constraints limit allowed values in a column through data types, CHECK or NOT NULL.
- They define the valid domain of an attribute.
Last verified on 27-11-2026
303 What does COUNT(Email) count?
Explanation
- COUNT(column) ignores NULL values in that column.
- COUNT(*) is used when every row must be counted.
Last verified on 27-11-2026
304 Which data type would store both date and time, such as 2026-11-27 10:30:00?
Explanation
- DATETIME stores both a calendar date and a time of day.
- DATE stores only the date and TIME only the time.
Last verified on 27-11-2026
305 In a WHERE clause, rows where the condition evaluates to UNKNOWN are:
Explanation
- WHERE keeps only rows where the condition is TRUE; UNKNOWN rows are filtered out.
- This is why NULL comparisons can silently drop rows.
Last verified on 27-11-2026
306 What is the effect of declaring a column as INT UNSIGNED in MySQL?
Explanation
- UNSIGNED forbids negative values and extends the positive range.
- It is useful for counts and IDs that are never negative.
Last verified on 27-11-2026
307 Which function returns the first non-NULL value in a list?
Explanation
- COALESCE returns the first non-NULL argument.
- For example COALESCE(Phone, 'Not given') supplies a fallback.
Last verified on 27-11-2026
308 Which data type is most appropriate for storing TRUE or FALSE values?
Explanation
- BOOLEAN is designed for true/false values.
- INT or CHAR can mimic it but BOOLEAN expresses the intent directly.
Last verified on 27-11-2026
309 Which data type is best for storing a long product description?
Explanation
- TEXT stores long variable-length text beyond the usual VARCHAR limit.
- CHAR and short VARCHAR are too small for long descriptions.
Last verified on 27-11-2026
310 In a table OrderItem(OrderID, ProductID, Quantity), what is the composite primary key?
Explanation
OrderID and ProductID together identify each order item uniquely, while Quantity is a non-key attribute.
Last verified on 27-11-2026