Jump to content

Recommended Posts

Posted

Im using Sql Server 2005 but this is a general SQL question.

 

I've been using JOIN for some time in the form:

SELECT * FROM MyTable mt JOIN MyStuff ms ON mt.ID = ms.ID WHERE ms.Labels = 22;

 

My question is, what if i did this:

SELECT * FROM MyTable mt JOIN MyStuff ms ON ms.Labels = 22 AND mt.ID = ms.ID;

 

The WHERE clause was dropped and the ms.Labels was moved to be apart of the ON area. Whats the difference? What kinds of results can i expect back as compared to using the WHERE. Is there some major consequence of using it in this way?

 

Tx

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...