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 happens when converting big values to integers?

999


What is the need for group functions in sql?

1083


How to store and query spatial data?

993


What are the encryption mechanisms in sql server?

1028


What are different backups available in sql server?

1072


what is the difference between Tabular and Matrix report?

170


How to download and install microsoft .net framework version 2.0?

1139


What is server-level principal?

122


Explain few examples of stored procedure over triggers?

1042


What are points to remember while using the fillfactor argument?

970


How to retrieve error messages using mssql_get_last_message()?

1054


What is it unwise to create wide clustered index keys?

1007


How do I setup a sql server database?

1073


What are commonly used mssql functions in php?

1080


Explain filtered indexes benefits?

1000