|
SQL 2008 introduced a bunch of new features, some of which I took annoyance at - the naming for all the different types of new date / time datatypes. (And I thought that varchar(MAX) was a poor name choice too - why not just make TEXT become that? or if a new type was needed why not LONG VARCHAR?) Anyways, what things in SQL2008 have you gone back and changed old code to take advantage of, or changing your coding style for new code EDIT Squirrel asked: "It is not broken why change?" For me the reasons would be
but also I might change the way we write CRUD routines if there where enhancements that improved them (MERGE might be one); changing our templates for these would mean that new routines used the new style, and over time old routines would be refactored (for us that would be whenever a change was needed to that routine, or if there was a benefit in the new template that we specifically wanted to apply to certain tables)
(comments are locked)
|
|
Here's what I love -- you can finally assign default values in a declare statement!
As far as I can tell, this is new in 2008. And I love it. About time! I'm old fashioned. I still DECLARE first and ASSIGN separately (any language). I think that Assigning as part of the Declaration adds complexity to the debugging process (i.e. Cost and Time lost). Declarations (OK, maybe not in SQL) start to include Function calls, and all sorts of complexity, all wrapped up in innocent looking DECLARATION statements.
Oct 07 '09 at 05:12 PM
Kristen ♦
(comments are locked)
|
|
I'm now using merge a lot - never thought I would. Use date and time datatypes to save space but not sure it's such a good idea as it needs a convert to use for some date functions. Had to use ssis instead of bulk insert/bcp to import utf-8 data - not sure whether that stopped working in 2005 or 2008 though. Started using reporting services more as it seems to work in 2008.
(comments are locked)
|
|
T-SQL wise there's no need to change anything. IMO the single best T-SQL upgrade is the MERGE statement. It allows for some really powerful conditional table manipulation all in one statement. It also lessens the number of locks taken during the so called UPSERT that the previous if exists update else insert method.
(comments are locked)
|
|
It depends on what you're upgrading from. From 2005, very few changes to the core TSQL language that we're not already taking advantage of. From 2000, whoa, the list is long. Let's see, CTE's, OVER(ORDER BY...), XPath... just off the top of my head.
(comments are locked)
|
|
One of my favorite new features of SQL Server 2008 is composable DML.
(comments are locked)
|
1 2 next page »

