1
kudos
spam Kudos Remove

Bad habits to kick : using table aliases like (a, b, c) or (t1, t2, t3)

published 845 days, 23 hours, 13 minutes ago posted by sasa 850 days, 20 hours, 26 minutes ago
Wednesday, October 14, 2009 3:02:13 PM GMT Friday, October 09, 2009 5:48:50 PM GMT

In my last post in this series, I talked about using old-style JOINs.  Today I'd like to touch on using aliases.  No, I don't mean fake passports and a life of crime, I mean using an alias as shorthand for referencing a table or view in a query.

Some code I once had to clean up on an inherited system looked a lot like this:SELECT *   FROM Orders a   INNER JOIN OrderDetails b ON 

category: News | clicked: 3 | | source: sqlblog.com | show counter code
tags: Best Practices, habits, table aliases

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

To post your comment please login or signup