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 a non clustered primary key?

516


What is the difference between stored procedure and functions?

604


What are the tool windows in sql server management studio? : sql server management studio

624


What is the difference between writing data to mirrored drives versus raid5 drives

515


What is RMS migrations?

1711






What is sql or structured query language?

687


Explain about unique identifier data type in sql server?

516


How many types of functions are there in sql server?

467


How to fine-tune reports?

153


Explain transaction server explicit transaction?

509


Explain what is the function of sql server agent windows service?

548


Why I have to use stored procedures?

600


Why variables called the most powerful component of ssis?

595


What is openrowset sql server?

522


How can you know if the row fetched from cursor is still valid in underlying table?

522