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 / sql pro

/*stored procedure for emplpoyee and department table
to get DeptName which has no employee records*/

select d.dept_name
from dept d
left join empl e
on d.dept_id = e.dept_id
where e.dept_id is null

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is query and its types?

604


How to get a list of columns in a view using the "sp_help" stored procedure?

675


What is a print index?

579


What is the purpose of sql profiler in sql server?

591


Can you insert NULL in unique column?

733






What is function of CUBE ?

685


How to deploy the Report?

97


Do you know the policy based administration feature of sql server 2008?

656


Explain syntax for dropping triggers?

625


Explain about unique identifier data type in sql server?

596


What is sql server database?

579


What options are there to delete rows on the publisher and not on the subscriber? : sql server replication

777


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2227


explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration

547


How will you hide an attribute? : sql server analysis services, ssas

608