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
Explain the steps needed to create a scheduled job?
How do you delete a data source?
What new changes are being made in SQL Server?
What is set nocount on?
Explain what is lock escalation?
Can we add an identity column to decimal datatype?
What functions can a view be used to performed?
Why we use the openxml clause?
Explain about integration services of Microsoft SQL server?
What is the purpose of data source?
Difference between DELETE and TRUNCATE?
what is a join? : Sql server database administration
1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.
What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?
What is sub-query in sql server?