SQL Server Query MCQs

Question 11: What are the characteristics of the HAVING clause?

Question 12: Consider the Employee table below. Write a query to change the salary of an employee whose EmpID is 3 to 25000.

Question 13: Which of the following query inserts a row in the Employee table?

Question 14: Write a query to disable a trigger trgEmpUpdate on the Employee table.

Question 15: How do you include an alias name for the EmpID column of the Employee table in a SELECT statement in SQL Server?

Question 16: Write a query to create a new user 'Nancy' in the HR database for Login 'David'.

Question 17: Identify the valid query to assign SELECT permission to user Nancy on the Employee table in the HR database.

Question 18: Write a query to display the FirstName and LastName of the Employee table as a single column as LastName, FirstName

Question 19: How do you delete a UNIQUE constraint named UNQ_Email in the Employee table using T-SQL?

Question 20: Using a subquery, write a query to fetch all employees (Empid, FirstName, Salary) from the Employee table having a salary less than the average salary.