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
Where to find ntwdblib.dll version 2000.80.194.0?
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
What happens if ntwdblib.dll is missing on your machine?
Explain primary key and foreign key constraints?
You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?
Why is sql server log file full?
Can I work with several databases simultaneously? : sql server management studio
How can we delete Duplicate row in table?
Explain tablesample?
How to receive returning result from a query?
How to disconnect from a sql server using mssql_close()?
Can you explain powershell included in sql server 2008?
What are constraints in microsoft sql server?
What are null values in ms sql server?
Which autogrowth database setting is good?