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