1
kudos
spam Kudos Remove

Bad habits to kick : using old-style JOINs

published 845 days, 22 hours, 26 minutes ago posted by sasa 850 days, 19 hours, 29 minutes ago
Wednesday, October 14, 2009 3:02:13 PM GMT Friday, October 09, 2009 5:59:18 PM GMT

In my last post in this series, I talked about using simple loops to populate large tables.  This time I'd like to focus on getting rid of old, ANSI-89 joins.

I am sure most veterans know better than to use old ANSI-89 JOIN syntax, such as:SELECT o.OrderID, od.ProductID FROM dbo.Orders AS o, dbo.OrderDetails AS d WHERE o.OrderDate >= '20091001' AND o.OrderID = od.ProductID; One reason to avoid this syntax is that the query is often less readable than when you separate the joining criteria fr...

category: News | clicked: 0 | | source: sqlblog.com | show counter code
tags: ANSI-89, ANSI-92, Best Practices, habits, old-style joins

No comments yet, be the first one to post comment.

To post your comment please login or signup