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
What is SQL Azure Data sync?
What is the maximum size of a row in sql server?
What is user-defined functions? What are the types of user-defined functions that can be created?
How to end a stored procedure properly in ms sql server?
What are the new features are introduced in sql server 2012 reporting services?
Where can you add custom error messages to sql server?
How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.
What is compression - row-level and page-level compression?
Explain what are the restrictions that views have to follow? : SQL Server Architecture
How many categories of data types used by sql server?
Is mysql the same as sql server?
What are the dmvs?
When we should use and scope of @@identity?
What are the differences between substr and charindex in sql server.
Explain “@@rowcount” and “@@error” in sql server?