Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 5 - DDL (Data Definition Language)
Lesson Content Link:DEFAULT Constraint
Current Quiz Count:45
Progress
0%
Q1
True / False

DEFAULT constraints can be used to provide a default value for a column when no value is specified during an INSERT.

Q2
True / False

A DEFAULT constraint can be used to automatically increment a numeric column.

Q3
True / False

DEFAULT constraints can be applied to columns of any data type.

Q4
True / False

A column with a DEFAULT constraint cannot also have a NOT NULL constraint.

Q5
True / False

DEFAULT constraints are ignored if a value is explicitly provided during an INSERT operation.

Q6
True / False

DEFAULT constraints can be used to assign default values to existing rows in a table.

Q7
True / False

DEFAULT constraints can include expressions or functions to compute default values.

Q8
True / False

A DEFAULT constraint can be removed from a column using the ALTER TABLE statement.

Q9
True / False

DEFAULT constraints are applied only when the column value is NULL during an INSERT operation.

Q10
True / False

DEFAULT constraints cannot be used in combination with IDENTITY properties.

Q11
True / False

The DEFAULT constraint can be used to specify a default value for a foreign key column.

Q12
True / False

DEFAULT constraints are automatically enforced by the SQL Server database engine.

Q13
True / False

The DEFAULT constraint can be used to enforce a value format, such as date or numeric format.

Q14
True / False

DEFAULT constraints cannot be applied to columns that already have a default value specified.

Q15
True / False

DEFAULT constraints are useful for ensuring that a column always has a value, even if none is provided during an INSERT.

Q16
Single Choice

Which statement is used to add a DEFAULT constraint to an existing column?

Q17
Single Choice

What happens if you insert a NULL value into a column with a DEFAULT constraint?

Q18
Single Choice

Which SQL Server keyword is used to remove a DEFAULT constraint?

Q19
Single Choice

What is the primary purpose of using a DEFAULT constraint in SQL Server?

Q20
Single Choice

Can DEFAULT constraints be used in conjunction with other constraints like PRIMARY KEY?

Q21
Single Choice

Which of the following cannot be used as a default value in a DEFAULT constraint?

Q22
Single Choice

In SQL Server, which statement is correct regarding the application of DEFAULT constraints?

Q23
Single Choice

What type of constraint is used to provide a default value for a column when no value is specified?

Q24
Single Choice

When adding a DEFAULT constraint to a column, which keyword is used in SQL Server?

Q25
Single Choice

Which of the following is a valid default value for a DATE column using a DEFAULT constraint?

Q26
Single Choice

Which SQL statement is used to modify an existing DEFAULT constraint?

Q27
Single Choice

What is the effect of defining a DEFAULT constraint on a column with existing data?

Q28
Single Choice

In SQL Server, which keyword is used to define a default value for a column?

Q29
Single Choice

Can a DEFAULT constraint be applied to a column that is part of a PRIMARY KEY?

Q30
Single Choice

Which of the following functions can be used as a default value in a DEFAULT constraint?

Q31
Multiple Choice

Which of the following are valid default values for a VARCHAR column?

Q32
Multiple Choice

What are the benefits of using DEFAULT constraints in SQL Server?

Q33
Multiple Choice

Which of the following statements about DEFAULT constraints are true?

Q34
Multiple Choice

Which functions can be used as default values in a DEFAULT constraint?

Q35
Multiple Choice

Which constraints can be used together with DEFAULT constraints?

Q36
Multiple Choice

Which of the following are true about removing a DEFAULT constraint?

Q37
Multiple Choice

In which scenarios are DEFAULT constraints particularly useful?

Q38
Multiple Choice

What happens when a default value is defined for a column?

Q39
Multiple Choice

Which of the following are limitations of DEFAULT constraints?

Q40
Multiple Choice

Which of the following statements are true about the DEFAULT keyword?

Q41
Multiple Choice

Which of the following are valid data types for DEFAULT constraints?

Q42
Multiple Choice

Which of the following can be used as default values for a DATE column?

Q43
Multiple Choice

Which functions are typically used as default values in DEFAULT constraints for timestamps?

Q44
Multiple Choice

Which of the following are characteristics of DEFAULT constraints?

Q45
Multiple Choice

Which of the following are true about the use of DEFAULT constraints in SQL Server?