Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Old Dog, New Tricks

By Steve Jones,

The saying goes that it's hard to teach an old dog new tricks. I suspect that's true for people as well, even with technology people who are used to learning new skills as software changes. We still tend to stick with what works, using familiar techniques and processes for writing code and building software. It seems to take a long time for any change to propogate through most of our industry, sometimes years.

SQL Server has tried to do away with the *= syntax for outer joins, and over years many have recommended the OUTER JOIN … ON syntax instead, but I still regularly find people posting questions on our forums that show the older style of joins. I know other platforms still use the older style of join syntax, and I suspect that it is still being taught in many classes that are not SQL Server specific.

Recently I learned something new, and made a change in the way I write queries. I didn't think I would adapt so quickly, having years of ingrained habits, but I was pleasantly surprised to adopt the change so quickly. Aaron Bertrand wrote a piece on aliasing columns and introduced the "=" syntax to me, which made sense right away. I have spent years writing aliases as simple quoted names after a column expression, avoiding typing the "AS", but that syntax is being deprecated. Aaron's argument about using the "=" makes sense to me, and if you are not worried about cross platform SQL, I'd recommend it to you. It certainly is easier to read result set headers to me.

T-SQL is evolving, and the way we write things is slowly changing. Semicolons will be required at some point, and I'd urge you to start using them. There are some other changes as well, and if you're ingrained with old habits, take a month and try something new. You might be surprised at how much more powerful some of the language enhancements are in your environment.

Steve Jones


The Voice of the DBA Podcasts

Our apologies for no podcast today. We are having issues with our hosting provider this week. We hope to be back with the podcasts next week.

Everyday Jones

The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there. Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

You can also follow Steve Jones on Twitter:

Total article views: 548 | Views in the last 30 days: 1
 
Related Articles
BLOG

Podcast Upgrades

A minor change for the podcasts next week. I got my wireless microphone, and I'm working with it a b...

BLOG

Podcasting

I'm working on getting a small studio set up for some podcasting of the editorials. That means I put...

ARTICLE

Podcast Announcements

Podcast Feeds

FORUM

Podcast Problem

Podcast Problem Blocked by group policy

BLOG

Podcasting

A new video setup is on the way!!!! Actually I'll do a couple podcasts on podcasting over the hol...

Tags
editorial    
t-sql    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones