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 happens when converting big values to integers?
What is the need for group functions in sql?
How to store and query spatial data?
What are the encryption mechanisms in sql server?
What are different backups available in sql server?
what is the difference between Tabular and Matrix report?
How to download and install microsoft .net framework version 2.0?
What is server-level principal?
Explain few examples of stored procedure over triggers?
What are points to remember while using the fillfactor argument?
How to retrieve error messages using mssql_get_last_message()?
What is it unwise to create wide clustered index keys?
How do I setup a sql server database?
What are commonly used mssql functions in php?
Explain filtered indexes benefits?