MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is a special value in SQL that represents missing or unknown data?
A
%
B
?
C
NULL
D
*
Explanation: 

Detailed explanation-1: -Databases use a special value called NULL to represent missing information.

Detailed explanation-2: -NULL indicates that the value is unknown. A null value is different from an empty or zero value. No two null values are equal. Comparisons between two null values, or between a null value and any other value, return unknown because the value of each NULL is unknown.

Detailed explanation-3: -A field with a NULL value is a field with no value. If a field in a table is optional, it is possible to insert a new record or update a record without adding a value to this field. Then, the field will be saved with a NULL value. Note: A NULL value is different from a zero value or a field that contains spaces.

Detailed explanation-4: -In SQL null is not equal ( = ) to anything-not even to another null . According to the three-valued logic of SQL, the result of null = null is not true but unknown.

Detailed explanation-5: -A NULL value is a special marker used in SQL to indicate that a data value does not exist in the database. In other words, it is just a placeholder to denote values that are missing or that we do not know.

There is 1 question to complete.