SQL Screening TestBy Collab Team Contributor / February 15, 2025 SQL Screening Test 1 / 20 What is the maximum number of clustered indexes allowed per table in SQL Server? 5 1 2 Unlimited 2 / 20 What is the function of the DISTINCT keyword in SQL? Groups rows based on unique values Joins two tables on unique values Deletes duplicate rows permanently Filters out duplicate rows in query results 3 / 20 In SQL Server, which function is used to get the current system date and time? NOW() SYSDATE() CURRENT_TIMESTAMP GETDATE() 4 / 20 Which SQL statement is used to remove all rows from a table without logging individual row deletions? DROP DELETE TRUNCATE REMOVE 5 / 20 What will happen if you try to insert a duplicate value in a column with a UNIQUE constraint? It will return an error It will ignore the duplicate and insert It will insert successfully It will replace the existing value 6 / 20 What happens when a NULL value is compared using the = operator? It throws an error It returns FALSE It returns TRUE It returns NULL 7 / 20 What is the default isolation level in SQL Server? READ UNCOMMITTED READ COMMITTED REPEATABLE READ SERIALIZABLE 8 / 20 Which SQL clause is used to filter grouped records? GROUP BY HAVING ORDER BY WHERE 9 / 20 Which command is used to modify an existing table structure? ALTER CHANGE MODIFY UPDATE 10 / 20 What does the UNION operator do in SQL? Combines results of multiple SELECT queries without duplicates Merges two tables permanently Joins two tables on a common key Combines results of multiple SELECT queries with duplicates 11 / 20 What will happen if a subquery returns multiple rows in a scalar subquery context? It will return only the first row It will return all row It will return NULL It will cause an error 12 / 20 What will be the result of a CROSS JOIN between two tables with 5 and 10 rows respectively? 5 rows 15 rows 50 rows 10 rows 13 / 20 Which type of join includes all records from the left table and only matching records from the right table? RIGHT JOIN LEFT JOIN FULL JOIN INNER JOIN 14 / 20 What does the SQL CASE statement do? Defines conditional logic inside a query Creates a new table Checks foreign key constraints Handles NULL values 15 / 20 What is the primary function of an index in SQL? To improve query performance To store duplicate records To enforce referential integrity To define foreign key relationships 16 / 20 In SQL, what is the purpose of the RANK() function? Assigns a unique rank to each row with possible gaps Returns the number of rows in a table Computes the sum of a column Assigns a unique rank to each row without gaps 17 / 20 In SQL, what does the COALESCE function do? Replaces NULL values with a default value Returns the first non-null value in a list Returns the last non-null value in a list Joins multiple tables 18 / 20 Which SQL function is used to remove leading and trailing spaces from a string? RTRIM() TRIM() LTRIM() REPLACE() 19 / 20 Which SQL statement is used to check for the existence of rows in a subquery? JOIN HAVING EXISTS IN 20 / 20 What does the ROW_NUMBER() function do in SQL? Groups rows based on a column Sorts rows in descending order Assigns a unique sequential number to rows Returns the number of rows in a table Your score isThe average score is 38% 0% Restart quiz