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
What are the commands used in DCL?
What is sql stored procedure?
How to provide values to stored procedure parameters in ms sql server?
Write a query to find 5th highest amount paid from the customer table.
What is default constraint in ms sql server?
What is the main purpose of having conversation group?
What is the use of sql profiler in sql server 2012?
How many databases Microsoft SQL server provides?
What is the full form of dql?
How many non clustered indexes there can be on table ?
What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio
What is checkpoint in sql server?
Explain the steps to use transact-sql cursor?
What is the difference between drop table and truncate table?
How to delete existing triggers using "drop trigger"?