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

What are the disadvantages of indexes?

1071


Explain the different types of joins?

971


What are number line correlation administrators will use while working with a subquery?

1157


What are the differences between decimal and float in ms sql server?

1209


Explain what is public role in sql server?

1108


What stored by the msdb? : sql server database administration

990


How to create a testing table with test data in ms sql server?

1065


How to create median function?

164


What are the dmvs? : sql server database administration

1043


What does normalization do to data?

1046


How to use values from other tables in update statements in ms sql server?

1094


How to end a stored procedure properly in ms sql server?

1068


Why use “pivot” in sql server?

1093


How many joins in sql server?

931


What is indexing and its types?

1003