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
How to integrate the ssrs reports in application?
How to loop through returning rows?
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?
Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?
How to concatenate two character strings together?
What happens if null values are involved in boolean operations?
Mention what are the different types of ssrs reports?
What does indexation mean?
Why it is recommended to avoid referencing a floating point column in the where clause?
How many types of the database links?
What are indexes in sql?
How to test odbc dsn connection settings?
What is the name of reporting services config file and what’s it’s used for?
tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
Are connections to sql server encrypted?