THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » t-sql » best practices   (RSS)
  • Bad habits to kick : ORDER BY ordinal

    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 ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on October 6, 2009
  • disallow results from triggers

    A setting that I noticed a while back when looking at sys.configurations was disallow results from triggers.  Triggers are one of my favorite subjects, and you will find a lot of good uses of them in my book (triggers are also well named, as poor usage of them will allow you to shoot your foot off in a heartbeat as I discussed in my earlier ...
    Posted to Louis Davidson (Weblog) by drsql on June 6, 2009
  • My stored procedure "best practices" checklist

    When developing stored procedures, there seems to be a lot of emphasis on ''get it done fast.'' Which means type all lower case, pay little attention to formatting, and sometimes throw best practices out the window. Personally, I would rather front-load my development time; I think that the costs I pay in initial development far outweigh what ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on October 30, 2008
  • Let's deprecate UPDATE FROM!

    I guess that many people using UPDATE … FROM on a daily basis do so without being aware that they are violating all SQL standards.   All versions of the ANSI SQL standard that I checked agree that an UPDATE statement has three clauses – the UPDATE clause, naming the table to be updated; the SET clause, specifying the columns to change and ...
  • Nondeterministic UPDATE

    Under the description for UPDATE in SQL Server 2000 and 2005 Books Online, you can find the following statement (thanks to SQL Server MVP Steve Kass for pointing me to this passage): The results of an UPDATE statement are undefined if the statement includes a FROM clause that is not specified in such a way that only one value is available for ...
    Posted to Linchi Shea (Weblog) by Linchi Shea on November 13, 2007
  • T-SQL Cursors -- the Case of the Published TPC-E Tests

    Within the SQL Server community, there is so much publicity on T-SQL set-oriented processing as good practice and the use of T-SQL cursors as bad practice that  T-SQL cursors are effectively being seen as a plague to be avoided when in fact it's not the use of T-SQ cursors, but their misuse, that should be avoided. To be fair, I must say that ...
    Posted to Linchi Shea (Weblog) by Linchi Shea on October 8, 2007
  • How NOT to pass a lot of parameters

    Did you know that SQL Server allows stored procedures to have up to 2100 parameters? And more important: do you care? Well, some people do care, and Joe Celko seems to be one of them.   If you are a regular reader of SQL Server newsgroups, you probably know Joe Celko from his always unfriendly and often incorrect replies. Here is a typical ...
Privacy Statement