Multiple choice

Assume that in a table named Papers, there is a column named Name. Which of the following SQL statements can be used to set its value to NULL?

  1. Update table papers set name=null

  2. Update papers set name=null

  3. Update papers set name is null

  4. Update name set papers=null

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The above statement will set the name column to null or empty values. The null keyword is used both with the = operator and is operator. When a statement like select/delete/update is used with a where clause, null is used with is for example select * from papers where name is null.But while accessing records with a null value, the = operator is used for example delete from papers where names is null.