While doing the QotD submissions as well as poking around the web for some answers, I recently ran across a couple of "Face Palm" moments that helped me solve a problem that in the past has taken a lot of code. These moments are prompting me to do some in depth learning of SQL Server over the next couple of months.
My favorite T-SQL enhancement (2005) has been CROSS APPLY. Wow...
Another was the use of Table Value Constructors to insert multiple records into a table with one statement (2008). This has saved a ton of time when creating sample data.
My most recent discovery moment has been the ability to declare and assign variables in one statement (2008).
I realize that some of these have been around for a while, but when I first used them, I had a smile on my face for the rest of the day. This is why I still love this doing this almost twenty years later.
Does anyone else have any of these kind of moments?