Microsoft SQL Server Database Quiz Questions

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

In Microsoft SQL Server, the CREATE TABLE statement can include a PRIMARY KEY constraint to enforce uniqueness and non-nullability on specified columns.

Q2
True / False

In SQL Server, you cannot define a PRIMARY KEY constraint on a table during its creation using the CREATE TABLE statement.

Q3
True / False

The CREATE TABLE statement in SQL Server allows defining default values for columns, ensuring that a specified value is used if no value is provided during insertion.

Q4
True / False

In SQL Server, the CREATE TABLE statement cannot be used to define foreign key constraints.

Q5
True / False

The CREATE TABLE statement in SQL Server can specify both column-level and table-level constraints, such as UNIQUE, PRIMARY KEY, and CHECK constraints.

Q6
True / False

In SQL Server, you can create a table with the CREATE TABLE statement that references tables in an ORACLE database using a linked server.

Q7
True / False

The CREATE TABLE statement in SQL Server allows for the creation of computed columns, which are virtual columns defined by an expression.

Q8
True / False

In SQL Server, a table created with the CREATE TABLE statement can only have one PRIMARY KEY constraint.

Q9
True / False

The CREATE TABLE statement in SQL Server cannot define a primary key constraint if the key involves more than one column.

Q10
True / False

In SQL Server, the CREATE TABLE statement can include a CHECK constraint to enforce a condition on values in a column.

Q11
True / False

The CREATE TABLE statement in SQL Server can be used to create a table with an identity column, which automatically generates unique values.

Q12
True / False

In SQL Server, the CREATE TABLE statement allows you to define the collation for character data, which controls the sorting and comparison rules.

Q13
True / False

The CREATE TABLE statement in SQL Server can be used to define a table with partitioning, which helps manage large tables by dividing them into smaller pieces.

Q14
True / False

In SQL Server, a table created with the CREATE TABLE statement cannot have columns with the same names as columns in a table from an ORACLE database linked via a linked server.

Q15
True / False

The CREATE TABLE statement in SQL Server supports creating temporary tables that are automatically dropped when the session ends.

Q16
Single Choice

Which keyword is used to create a new table in SQL Server?

Q17
Single Choice

What is the purpose of the PRIMARY KEY constraint in a CREATE TABLE statement?

Q18
Single Choice

In SQL Server, which clause is used to define a default value for a column in a CREATE TABLE statement?

Q19
Single Choice

Which of the following is a valid data type for a column in a CREATE TABLE statement in SQL Server?

Q20
Single Choice

How do you specify a column as a primary key in a CREATE TABLE statement?

Q21
Single Choice

Which keyword is used to specify a column that automatically increments its value in a CREATE TABLE statement?

Q22
Single Choice

In SQL Server, which statement is true about creating a table with a foreign key constraint?

Q23
Single Choice

What happens if you try to create a table with a primary key column that allows null values?

Q24
Single Choice

Which keyword is used to define a table-level constraint in a CREATE TABLE statement?

Q25
Single Choice

How can you ensure that a column in a new table only contains unique values?

Q26
Single Choice

In SQL Server, which data type should you use for a column storing date and time values?

Q27
Single Choice

Which keyword is used to specify that a column must contain a value in a CREATE TABLE statement?

Q28
Single Choice

What is the purpose of a CHECK constraint in a CREATE TABLE statement?

Q29
Single Choice

In SQL Server, which clause is used to specify the collation for a character column in a CREATE TABLE statement?

Q30
Single Choice

Which statement is true about creating a table with a computed column in SQL Server?

Q31
Multiple Choice

Which of the following can be specified in a CREATE TABLE statement in SQL Server?

Q32
Multiple Choice

Which of the following are valid constraints in a CREATE TABLE statement in SQL Server?

Q33
Multiple Choice

Which of the following are data types supported in SQL Server for a column in a CREATE TABLE statement?

Q34
Multiple Choice

In SQL Server, which of the following can be defined using the CREATE TABLE statement?

Q35
Multiple Choice

Which of the following are valid uses of the CREATE TABLE statement in SQL Server?

Q36
Multiple Choice

Which of the following statements are true about using the CREATE TABLE statement in SQL Server?

Q37
Multiple Choice

Which constraints can be defined at the column level in SQL Server using the CREATE TABLE statement?

Q38
Multiple Choice

In SQL Server, which of the following can be specified as part of a column definition in a CREATE TABLE statement?

Q39
Multiple Choice

Which of the following are valid data types for columns in a CREATE TABLE statement in SQL Server?

Q40
Multiple Choice

Which of the following statements are true about the IDENTITY property in SQL Server?

Q41
Multiple Choice

Which of the following are valid constraints that can be defined in the CREATE TABLE statement in SQL Server?

Q42
Multiple Choice

In SQL Server, which of the following statements about computed columns is true?

Q43
Multiple Choice

Which of the following are valid collation settings for character columns in SQL Server?

Q44
Multiple Choice

Which of the following are valid options for specifying default values in a CREATE TABLE statement in SQL Server?

Q45
Multiple Choice

In SQL Server, which of the following features can be used to partition large tables created with the CREATE TABLE statement?