Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 3 - Database Tables, Columns and Rows
Lesson Content Link:SQL
Current Quiz Count:45
Progress
0%
Q1
True / False

In SQL Server, columns in a table must have unique names.

Q2
True / False

A SQL Server table can have multiple columns with the same name if they are in different tables.

Q3
True / False

The ROW_NUMBER() function in SQL Server is used to assign a unique number to each row in the result set.

Q4
True / False

SQL Server supports dynamic column names in queries.

Q5
True / False

In SQL Server, you can use a CTE (Common Table Expression) to create a temporary result set within a SELECT query.

Q6
True / False

A table in SQL Server can have multiple primary keys.

Q7
True / False

SQL Server allows columns to have default values.

Q8
True / False

In SQL Server, the FOREIGN KEY constraint can be used to enforce referential integrity between tables.

Q9
True / False

SQL Server allows you to rename columns using the ALTER TABLE statement.

Q10
True / False

The SELECT DISTINCT statement in SQL Server can be used to remove duplicate rows from the result set.

Q11
True / False

In SQL Server, the UPDATE statement can modify both columns and rows in a table.

Q12
True / False

In SQL Server, a column can be defined to allow NULL values by default.

Q13
True / False

SQL Server supports column-level and table-level constraints.

Q14
True / False

SQL Server allows columns to be indexed to improve query performance.

Q15
True / False

In SQL Server, you cannot delete a column from a table using the ALTER TABLE statement.

Q16
Single Choice

Which SQL Server function returns the number of rows in a table?

Q17
Single Choice

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

Q18
Single Choice

Which function is used to calculate the sum of a numeric column in SQL Server?

Q19
Single Choice

What is the purpose of the GROUP BY clause in SQL Server?

Q20
Single Choice

Which SQL Server keyword is used to sort the result set of a query?

Q21
Single Choice

What type of join returns all rows from both tables, with matching rows from both sides where available?

Q22
Single Choice

Which function is used to find the maximum value in a column in SQL Server?

Q23
Single Choice

Which SQL Server function converts a string to uppercase?

Q24
Single Choice

Which command is used to remove all records from a table without removing the table itself?

Q25
Single Choice

Which clause is used to filter records based on specific conditions in SQL Server?

Q26
Single Choice

Which SQL Server command is used to modify the structure of an existing table?

Q27
Single Choice

Which function in SQL Server returns the current date and time?

Q28
Single Choice

Which SQL Server function is used to round a numeric value to a specified number of decimal places?

Q29
Single Choice

Which SQL Server command is used to remove a table from a database?

Q30
Single Choice

Which function in SQL Server concatenates two or more strings into one string?

Q31
Multiple Choice

Which of the following are valid SQL Server data types for columns?

Q32
Multiple Choice

Which of the following SQL Server functions can be used to handle NULL values?

Q33
Multiple Choice

Which SQL Server keywords are used to combine the result sets of multiple queries?

Q34
Multiple Choice

Which constraints are used to ensure data integrity in SQL Server?

Q35
Multiple Choice

Which functions in SQL Server are used for date and time manipulation?

Q36
Multiple Choice

Which SQL Server commands are used to change data in a table?

Q37
Multiple Choice

Which SQL Server clauses are commonly used in a SELECT statement?

Q38
Multiple Choice

Which of the following are valid aggregate functions in SQL Server?

Q39
Multiple Choice

Which SQL Server commands can be used to modify a table’s structure?

Q40
Multiple Choice

Which SQL Server operators are used to compare values in a WHERE clause?

Q41
Multiple Choice

Which functions are used for string manipulation in SQL Server?

Q42
Multiple Choice

Which SQL Server features support the enforcement of referential integrity?

Q43
Multiple Choice

Which commands are used to manage transactions in SQL Server?

Q44
Multiple Choice

Which SQL Server statements are used to create and modify indexes?

Q45
Multiple Choice

Which SQL Server functions can be used to extract parts of a date?