NewsBot
1
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
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