quiz

Full-stack dev quiz question #59

Full-stack dev quiz question #59quiz

Null values in relational databases are special in many ways. Do two nulls violate uniqueness? Check fifty ninth question of full-stack dev quiz to check if you know how to play with null values.

Consider a table BOOKS with BOOK_HASH column created in MySQL. There is a unique constraint created on the BOOK_HASH column. It is the only column in that unique constraint.

Which sentences are true? Choose all valid answers.

  1. null value is defined as the absence of any data value by ISO SQL standard
  2. two null values can be inserted to the BOOK_HASH column if the column is numeric
  3. two null values can be inserted to the BOOK_HASH column if the column is varchar
  4. unique constraint allows two null values, but a unique index does not
  5. the BOOK_HASH column cannot contain any null value, because all values must be unique, but null can mean any value
  6. a unique index is automatically created on the BOOK_HASH column by MySQL engine, because it has a unique constraint

For the correct answer scroll down

.

.

 

 

 

 

 

 

 

 

 

 

Do not miss valuable content. You will receive a monthly summary email. You can unsubscribe anytime.

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The correct answer is: a, b, c, f. If you would like to read more, check MySQL unique index with null values article.

If you like what I do, consider buying me a coffee :)

Buy me a coffeeBuy me a coffee