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 are the disadvantages of indexes?
Explain the different types of joins?
What are number line correlation administrators will use while working with a subquery?
What are the differences between decimal and float in ms sql server?
Explain what is public role in sql server?
What stored by the msdb? : sql server database administration
How to create a testing table with test data in ms sql server?
How to create median function?
What are the dmvs? : sql server database administration
What does normalization do to data?
How to use values from other tables in update statements in ms sql server?
How to end a stored procedure properly in ms sql server?
Why use “pivot” in sql server?
How many joins in sql server?
What is indexing and its types?