1
kudos
spam Kudos Remove

Bad habits to kick : declaring VARCHAR without (length)

published 952 days, 18 hours, 41 minutes ago posted by sasa 956 days, 18 hours, 30 minutes ago
Tuesday, October 13, 2009 3:01:48 PM GMT Friday, October 09, 2009 3:13:25 PM GMT

In my last post in this series, I talked about using meaningless table aliases.  This time I'm going to talk about a pet peeve of mine: declaring varchar / nvarchar variables or parameters without specifying how many characters they should hold. Thankfully, I see this issue seldom in the code I've inherited in my own systems.  But I do see it quite a bit on blog entries, forum posts and newsgroup questions.  Because the length attribute is optional, people seem to make the assumption that defining a VAR...

category: News | clicked: 2 | | source: sqlblog.com | show counter code
tags: Best Practices, declare, habits, Variables

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

To post your comment please login or signup