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 / unnikrishnan nair r
CREATE PROCEDURE GetDept
AS
SELECT Dept_name from dept
WHERE Dept_Id NOT IN(SELECT DISTINCT Dept_id FROM Emp )
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are the steps you should follow to start sql server in single-user mode?
Explain indexing and what are the advantages of it?
explain different types of cursors? : Sql server database administration
How do I get to sql server configuration manager?
Do you have any idea about the tcl commands?
What are sub reports and how to create them?
What happens when unicode strings concatenate with non-unicode strings?
How to use old values to define new values in update statements in ms sql server?
Explain system scalar functions?
What is temporary stored procedure?
What are the advantages of user defined function?
What is a rollup clause?
Explain the steps to use transact-sql cursor?
How we create SQL Server 2005 Reporting Services ? Give me Sample
How to create an multi-statement table-valued function?