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 / vinoth kumar

select * from department where Dept_id
not in(select Dept_id
from employee)

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define Unique Key?

763


can a database be shrunk with users active? : Sql server administration

757


What is the difference between grant and with grant while giving permissions to the user?

728


What is the use of sql profiler in sql server 2012?

667


How to retrieve field values using mssql_result()?

808






When should you use an instead of trigger?

701


How do I start sql server 2017?

702


What are out-of-range errors with date and time literals?

721


Define right outer join?

716


What is checkpoint in sql server?

814


Can foreign key be duplicate?

801


You want to check the syntax of a complicated update sql statement without executing it. What command should you use?

677


Do you know exporting and importing utility?

696


What is statement level trigger?

753


How do I uninstall sql server 2014?

679