Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

RE: Expand / Collapse
Author
Message
Posted Wednesday, August 23, 2006 11:21 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 6, 2012 11:33 PM
Points: 4, Visits: 31

We can use Exists instead of Outer Join which is more speed than Outer Join

When you are not expecting any column from second table then don't use Join use only Exists. Like following

SELECT S.* FROM Students s
 WHERE NOT EXISTS
 (
  SELECT 1 FROM StudentExam se WHERE se.ExamName = 'SQL Server'
  AND S.StID = SE.StID
  

Post #303588
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse