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)
Answer by Jeff Smith ·
Here's what I love -- you can finally assign default values in a declare statement!
declare @i int = 12 declare @name varchar(10) = 'jeff'
As far as I can tell, this is new in 2008. And I love it. About time!
Answer by nigelrivett ·
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.
Answer by RickD ·
Unfortunately i've stopped using it for a while as the contract i'm in now has a version of Business Objects that isn't validated with 2008.. Grrrr.
My favourite feature so far is the MERGE statement, it just saves so much development time.
The only gripe is that there need to be more support for 64 bit as it is sometimes hard to find resources, especially when having to connect to other databases (Orable is a nightmare, but even Sybase takes a lot of faffing [unless you want to pay a fortune for some data-direct drivers]). I know it took a while for SQL 2005 to get these drivers, but 2008 is not that big a step onwards.
Answer by Grant Fritchey 1 ·
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.
Answer by MladenPrajdic ·
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.
Answer by Squirrel 1 ·
i don't. It is not broken why change ?
Actually, we can't anyway. Most of the time, we can't change to utilize those new feature or functions for the simple fact that our applications have to be able to run for all of our existing client and some of them still running on SQL 2000.
Answer by David 2 1 ·
I haven't so far.
Having been made redundant as an Oracle DBA a few months back I have been fortunate enough to secure a new SQL Server DBA position so have been spending my time getting to grips with T-SQL and the SQL Server RDBMS so I really appreciate this website and everybody who has helped me. Thanks.