Table Column Attributes  «Prev  Next»

Datatypes, Length, Precision, Scale, and Nulls - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. What is the relationship between the amount of disk space required between a unicode and non-unicode datatype?
Please select the best answer.
  A. Answer: Unicode takes twice as much space as non-unicode.
  B. Non-unicode takes twice as much space as unicode.
  C. Unicode takes four times as much space as non-unicode.
  D. Non-unicode takes four times as much space as unicode.

2. For column EmployeeID, you try to specify a datatype of Int with a length of 4, but you receive an error. Other columns do not give you an error. What is the possible reason for this error?
Please select the best answer.
  A. EmployeeID is an invalid column name.
  B. EmployeeIDs cannot have an Int datatype.
  C. You do not have correct permissions on the table.
  D. You cannot specify a length with an Int datatype.

3. Which of the following is equivalent to null?
Please select the best answer.
  A. 0
  B. An empty string
  C. The absence of a value
  D. The word “NULL”

4. A column named UnitPrice is defined as decimal(10,2). A user inserts the value 19.998 into it. What value actually gets stored?
Please select the best answer.
  A. 19.99
  B. 20.00
  C. The insert fails with an overflow error.
  D. 19.998

5. The ManagerID column allows NULL, and several rows currently have no value in it. What happens when you run SELECT * FROM dbo.Employees WHERE ManagerID = NULL;?
Please select the best answer.
  A. It returns every row where ManagerID has no value.
  B. It returns no rows at all, even though some rows have no ManagerID value.
  C. It raises a syntax error.
  D. It returns every row in the table regardless of ManagerID.