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 many types of stored procedures are there in sql server?
What is merge join?
What are the basic functions for master, msdb, model, tempdb and resource databases?
What does it mean to normalize a database and why would you do it?
What are the new features are introduced in sql server 2012 reporting services?
Find nth lowest salary or get nth lowest salary?
What are the 3 types of schema?
How to stop a loop early with break statements in ms sql server?
How to create a login account in ms sql server to access the database engine using "create login" statements?
Define views.
What is transaction server consistency?
What is transaction server implicit?
How to list all objects in a given schema?
What is the difference between delete and truncate statements?
Can we insert data into a view?