SQL Server Practice Test – 4 1. SQL Server Practice Tests How can you enforce uniqueness on multiple columns in SQL Server? PRIMARY KEY UNIQUE CONSTRAINT CHECK CONSTRAINT FOREIGN KEY None 2. SQL Server Practice Tests Which SQL Server clause is used to filter groups in aggregated data? WHERE HAVING GROUP BY ORDER BY None 3. SQL Server Practice Tests How does the PIVOT operator function in SQL Server? Filters rows in a table Transforms rows into columns Combines multiple tables None 4. SQL Server Practice Tests What is the primary function of SQL Server Agent? Index optimization Automates and schedules tasks Data encryption Query analysis None 5. SQL Server Practice Tests What does the TOP clause do in SQL Server? Sorts the data in ascending order Limits the number of rows returned by a query Groups data based on conditions Filters duplicate rows None 6. SQL Server Practice Tests Which SQL Server feature is used to capture changes to a table for auditing purposes? DATABASE MIRRORING CHANGE DATA CAPTURE (CDC) FULL TEXT SEARCH ROW VERSIONING None 7. SQL Server Practice Tests What does the FOR XML clause in SQL Server do? Creates XML files Formats query results as XML Imports XML data Validates XML schemas None 8. SQL Server Practice Tests Which function helps in ranking rows in SQL Server? ROWNUM() DENSE_RANK() RANK() ROW_NUMBER() None 9. SQL Server Practice Tests Which isolation level provides the highest level of consistency but may reduce concurrency? READ COMMITTED SERIALIZABLE READ UNCOMMITTED SNAPSHOT None 10. SQL Server Practice Tests Which function is used to remove leading and trailing spaces in SQL Server? LTRIM() and RTRIM() SPACE() REMOVE() TRIM() None Time's up