See why I prefer alias = expression
over the more standards-compliant expression AS alias
syntax.
28 Search results
See why it pays to be consistent about always aliasing every table and every column in your query.
A little wisdom on using sensible and logical aliases for your tables, instead of a / b / c / d.
2023 was an interesting year for SQLblog.org – I talk about top posts and some changes I made here over the year.
I talk about the evolution of my thinking on featured images, and how I use generative AI for most post companions these days.
For this month's T-SQL Tuesday, Steve Jones asks us to talk about problems we've solved using window functions.
For T-SQL Tuesday #156, I talk about the qualities I expect in T-SQL code before I consider it "production quality."
For this month's T-SQL Tuesday, I talk about a not-quite-yet-announced feature in SQL Server 2022 that has the potential to function as a low-effort bad habit logger.
For this month's T-SQL Tuesday, Deb Melkin asks us get up on our favorite soapbox. I have so many, but this time I picked a new one…
I talk about why I prefer CONVERT over CAST to be consistent. Basically, if you sometimes HAVE to use only one, why not just ALWAYS use that one?
I talk a bit about bit columns: names with negative context, allowing NULLs, and using cryptic BITWISE operators instead of readable, self-documenting expressions.
An index of over a decade's worth of posts and videos involving bad habits and best practices in SQL Server.
I talk about a couple of subtleties of THROW, and how to avoid frustrating bouts of troubleshooting.
I investigate a deadlock issue with alias types and table-valued parameters, and the Connect items that have sprung up about this issue.
This month's T-SQL Tuesday is being hosted by Allen White (@SQLRunr) and is about sharing your T-SQL tips and tricks. Since I know many people...
See several examples supporting the idea that you should use catalog views, not INFORMATION_SCHEMA, in SQL Server.
For this month's T-SQL Tuesday, I talk about redundant string building.
For this month's T-SQL Tuesday, I share some of my favorite best practices.
Hugo Kornelis has suggested that SQL Server's proprietary UPDATE FROM and DELETE FROM should be deprecated (in favor of MERGE). I disagree.
I talk about some questionable choices by the SQL Server naming committee.
See some new metadata-related features introduced in SQL Server 2012.
I tried to deploy nested stored procedures that both had a cursor with the same name. It didn't go so well.
See why you should always use alias or column names in your ORDER BY clauses, rather than ordinal position.
Our data got messed up due to time drift. Here's how I fixed it.
I present a laundry list of things I always do in stored procedures (and why).
I wasn't crazy about a syntax implementation for Policy-Based Management, as it mixes T-SQL and C#.