|
|
|
|
Browse by Tags
All Tags » Best Practices » habits (RSS)
Showing page 2 of 2 (18 total posts)
-
In my last post in this series,
I
covered the use of ''bad'' characters in entity names, such as spaces
or dashes. In this post I will talk about using RETURN and OUTPUT inappropriately.
Jamie Thomson touched on part of this pet peeve in response to one of the other posts in this series. So let me ask, do you see anything wrong ...
-
In my last post in this series,
I talked about defining varchar columns, parameters, or variables without length. Next I want to talk about using ''bad'' characters, like spaces or dashes, in entity names.
Every once in a while, I see people who have issues with T-SQL code, or the Management Studio UI, or 3rd party applications - because ...
-
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 ...
-
Aaron has recently been doing an absolutely fantastic series of posts detailing various ''bad habits'' that many of us pick up somewhere along the way. These coding anti-patterns aren't going to crash your server, but they will make your code more difficult to read and maintain. I'm enjoying Aaron's series so much that I've decided to join in the ...
-
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 ...
-
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 ...
-
In my last post in this series, I talked about using ORDER BY <ordinal position>. Today I'd like to talk about using primitive loops to generate a large number of rows.
Okay, I will admit, in most cases you are doing this for a demo or proof of concept, and so speed / performance is not all that important. But using a loop to ...
-
A few weeks ago, I wrote a post about forming a new habit: always terminate statements with semi-colons. Today I thought I would start a series on kicking bad habits that many of us have developed over time. I provided a little more background on this series over on my company's site. Today's topic: using ordinal numbers in our ...
2
|
|
|
|
|