Write a stored procedure for emplpoyee and department table
to get DeptName which having no employee.
Table Structure-
Emp-Emp_Id,Emp_Name,Dept_id
Dept-Dept_Id,Dept_Name
Answer Posted / unnikrishnan nair r
CREATE PROCEDURE GetDept
AS
SELECT Dept_name from dept
WHERE Dept_Id NOT IN(SELECT DISTINCT Dept_id FROM Emp )
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Determine how to use the inserted and deleted pseudo tables?
What are the types of lock supported by ?
Explain a checkpoint?
How to list all triggers in the database with sys.triggers in ms sql server?
What is the difference between a stored procedure and a user defined function?
What is lookup override?
What is the use of “join” in sql server?
What are the new features in sql server 2016?
Explain about Normalization?
What are the dmvs?
how would you store your query in an SSRS report or a Database server?
what is denormalization and when would you go for it? : Sql server database administration
What is auditing in sql server?
What is enhanced database mirroring in sql server 2008?
What is a document index?