- Local time
- Tomorrow, 03:02
- Joined
- Jan 20, 2009
- Messages
- 12,849
SQL Server (2008R2 at least) queries support joins I have not seen before today when I discovered it in somoeone else's stored procedure.
Criteria that would normally be in the Where clause can be included in the Join statement. (No. Access doesn't support it if you were wondering.)
Are there any advantages or disadvantages to this construct over using a Where condition?
Criteria that would normally be in the Where clause can be included in the Join statement. (No. Access doesn't support it if you were wondering.)
Are there any advantages or disadvantages to this construct over using a Where condition?
Code:
SELECT *
FROM tableA
JOIN tableB
ON tableA.somefield = tableB.somefield AND tableB.anotherfield = 1