Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 9 - Advanced Topics
Lesson Content Link:DB Function
Current Quiz Count:45
Progress
0%
Q1
True / False

A scalar function in SQL Server returns a single value.

Q2
True / False

Table-valued functions can return multiple rows and columns.

Q3
True / False

A deterministic function always returns the same result for the same input values.

Q4
True / False

SQL Server does not support user-defined functions.

Q5
True / False

Functions cannot be used in the WHERE clause of a SQL query.

Q6
True / False

A table-valued function in SQL Server can be used like a regular table in SELECT statements.

Q7
True / False

User-defined functions in SQL Server can be scalar or table-valued.

Q8
True / False

Built-in functions in SQL Server can be replaced by user-defined functions.

Q9
True / False

A function can include T-SQL statements like SELECT, INSERT, UPDATE, and DELETE.

Q10
True / False

The RETURN statement is used to exit a function and return a value.

Q11
True / False

Inline table-valued functions can be more efficient than multi-statement table-valued functions.

Q12
True / False

Scalar functions can be used in computed columns.

Q13
True / False

A function in SQL Server cannot call another function.

Q14
True / False

Functions can be used in the ORDER BY clause of a SQL query.

Q15
True / False

Table-valued functions can be used to return complex data structures in SQL Server.

Q16
Single Choice

Which type of function returns a single value in SQL Server?

Q17
Single Choice

Which keyword is used to define a scalar function in SQL Server?

Q18
Single Choice

What is the main difference between scalar and table-valued functions?

Q19
Single Choice

Which of the following is true about inline table-valued functions?

Q20
Single Choice

What is the purpose of the RETURNS clause in a function definition?

Q21
Single Choice

Which function type is best suited for returning a result set that can be joined with other tables?

Q22
Single Choice

Which of the following is not a valid type of user-defined function in SQL Server?

Q23
Single Choice

How do inline table-valued functions differ from multi-statement table-valued functions?

Q24
Single Choice

Which clause is used to specify the return type of a scalar function?

Q25
Single Choice

Which of the following is an example of a built-in scalar function in SQL Server?

Q26
Single Choice

What is the purpose of the BEGIN...END blocks in a multi-statement table-valued function?

Q27
Single Choice

Which statement is true about deterministic functions?

Q28
Single Choice

Which function type in SQL Server can modify database state?

Q29
Single Choice

Which of the following is a benefit of using user-defined functions in SQL Server?

Q30
Single Choice

Which of the following is a valid reason to use a table-valued function?

Q31
Multiple Choice

Which of the following are characteristics of scalar functions in SQL Server? (Select all that apply)

Q32
Multiple Choice

What are the benefits of using table-valued functions in SQL Server? (Select all that apply)

Q33
Multiple Choice

Which of the following statements are true about deterministic functions in SQL Server? (Select all that apply)

Q34
Multiple Choice

What are the differences between inline and multi-statement table-valued functions? (Select all that apply)

Q35
Multiple Choice

Which of the following are valid uses of functions in SQL Server? (Select all that apply)

Q36
Multiple Choice

Which of the following types of functions can be used to return a result set that can be joined with other tables? (Select all that apply)

Q37
Multiple Choice

Which of the following are true about multi-statement table-valued functions? (Select all that apply)

Q38
Multiple Choice

Which of the following are characteristics of user-defined functions in SQL Server? (Select all that apply)

Q39
Multiple Choice

Which of the following are valid types of functions in SQL Server? (Select all that apply)

Q40
Multiple Choice

Which of the following are true about built-in scalar functions in SQL Server? (Select all that apply)

Q41
Multiple Choice

Which of the following are valid use cases for table-valued functions? (Select all that apply)

Q42
Multiple Choice

Which of the following are correct about deterministic functions in SQL Server? (Select all that apply)

Q43
Multiple Choice

Which of the following can be used to define a scalar function in SQL Server? (Select all that apply)

Q44
Multiple Choice

Which of the following can be used to define a table-valued function in SQL Server? (Select all that apply)

Q45
Multiple Choice

Which of the following statements are true about user-defined functions in SQL Server? (Select all that apply)