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

How to integrate the ssrs reports in application?

546


How to loop through returning rows?

581


how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?

1108


Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?

589


How to concatenate two character strings together?

579






What happens if null values are involved in boolean operations?

562


Mention what are the different types of ssrs reports?

102


What does indexation mean?

533


Why it is recommended to avoid referencing a floating point column in the where clause?

544


How many types of the database links?

613


What are indexes in sql?

584


How to test odbc dsn connection settings?

538


What is the name of reporting services config file and what’s it’s used for?

107


tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

570


Are connections to sql server encrypted?

582