Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Determine how to use the inserted and deleted pseudo tables?

929


What are the types of lock supported by ?

995


Explain a checkpoint?

975


How to list all triggers in the database with sys.triggers in ms sql server?

1014


What is the difference between a stored procedure and a user defined function?

973


What is lookup override?

959


What is the use of “join” in sql server?

1018


What are the new features in sql server 2016?

929


Explain about Normalization?

1012


What are the dmvs?

951


how would you store your query in an SSRS report or a Database server?

152


what is denormalization and when would you go for it? : Sql server database administration

1116


What is auditing in sql server?

880


What is enhanced database mirroring in sql server 2008?

914


What is a document index?

977