Q1
True / FalseA scalar function in SQL Server returns a single value.
A scalar function returns a single value of a specific type.
Q2
True / FalseTable-valued functions can return multiple rows and columns.
Table-valued functions return a table data type that can contain multiple rows and columns.
Q3
True / FalseA deterministic function always returns the same result for the same input values.
A deterministic function returns the same result every time it is called with a particular set of input values.
Q4
True / FalseSQL Server does not support user-defined functions.
SQL Server supports user-defined functions that allow the creation of custom functions.
Q5
True / FalseFunctions cannot be used in the WHERE clause of a SQL query.
Functions can be used in the WHERE clause to filter data.
Q6
True / FalseA table-valued function in SQL Server can be used like a regular table in SELECT statements.
A table-valued function can be treated as a regular table in SELECT statements, allowing joins and other operations.
Q7
True / FalseUser-defined functions in SQL Server can be scalar or table-valued.
User-defined functions can return a single value (scalar) or a table (table-valued).
Q8
True / FalseBuilt-in functions in SQL Server can be replaced by user-defined functions.
User-defined functions can complement built-in functions but cannot replace them.
Q9
True / FalseA function can include T-SQL statements like SELECT, INSERT, UPDATE, and DELETE.
Functions in SQL Server can include SELECT statements but cannot perform data modification operations like INSERT, UPDATE, and DELETE.
Q10
True / FalseThe RETURN statement is used to exit a function and return a value.
The RETURN statement is used to exit a function and return a value in SQL Server.
Q11
True / FalseInline table-valued functions can be more efficient than multi-statement table-valued functions.
Inline table-valued functions are often more efficient because they are simpler and can be optimized by the SQL Server query optimizer.
Q12
True / FalseScalar functions can be used in computed columns.
Scalar functions can be used to define computed columns in SQL Server tables.
Q13
True / FalseA function in SQL Server cannot call another function.
A function in SQL Server can call another function within its definition.
Q14
True / FalseFunctions can be used in the ORDER BY clause of a SQL query.
Functions can be used in the ORDER BY clause to sort query results.
Q15
True / FalseTable-valued functions can be used to return complex data structures in SQL Server.
Table-valued functions can return complex data structures like multiple rows and columns.