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

Is the order of columns in the set clause important in ms sql server?

604


What do you mean by subquery?

662


How to sort the query output with order by clauses in ms sql server?

726


What is a derived table?

618


What are the functions in sql server?

616






How much does sql server 2016 cost?

628


when would you go for denormalization? : Sql server database administration

563


How can you insert null values in a column while inserting the data?

811


what are the core components of SSRS?

95


What are horizontal and vertical scaling?

158


What is executereader?

620


how can u get last observation in an unknown dataset ?

2097


What are temporal tables in sql server 2016?

560


Give the query of getting last two records from the table in SQL SERVER?

631


What are the types of stored procedures in an sql server?

558