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 / madhuparna bhaumik

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

CREATE PROCEDURE sp_myStoredProcedure
AS
select * from emp full join departments on
emp.department_id=departments.department_id
where employee_id is null;
Go

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the commands used in DCL?

713


What is sql stored procedure?

786


How to provide values to stored procedure parameters in ms sql server?

717


Write a query to find 5th highest amount paid from the customer table.

703


What is default constraint in ms sql server?

712






What is the main purpose of having conversation group?

662


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

667


How many databases Microsoft SQL server provides?

782


What is the full form of dql?

704


How many non clustered indexes there can be on table ?

673


What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio

797


What is checkpoint in sql server?

814


Explain the steps to use transact-sql cursor?

668


What is the difference between drop table and truncate table?

657


How to delete existing triggers using "drop trigger"?

766