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 is SQL Azure Data sync?

123


What is the maximum size of a row in sql server?

1010


What is user-defined functions? What are the types of user-defined functions that can be created?

1087


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

1149


What are the new features are introduced in sql server 2012 reporting services?

160


Where can you add custom error messages to sql server?

1168


How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

3923


What is compression - row-level and page-level compression?

965


Explain what are the restrictions that views have to follow? : SQL Server Architecture

1104


How many categories of data types used by sql server?

1057


Is mysql the same as sql server?

1033


What are the dmvs?

1074


When we should use and scope of @@identity?

1050


What are the differences between substr and charindex in sql server.

1193


Explain “@@rowcount” and “@@error” in sql server?

1136