Home » 24HOP »Beginner »Intermediate »sql server »sqlserverpedia-syndication »SSC »Tips »TSQL » Currently Reading:

Forgotten T-SQL Cheat Sheet

You’ve seen the blog, you’ve downloaded the code…you even watched the 24HOP session recording…now own the Forgotten T-SQL Cheat Sheet!

Yessir, this handy-dandy reference sheet includes the Logical Processing Order of SELECT, shorthand for recursive CTEs and MERGE, the famous list-of-details XML trick, and more! And it’s yours, for only $199.99! FREE

Cheat Sheet Not To Scale


Because we like you.

And because it’s a handy-dandy reference for me, too.  (After all, wasn’t I the one who put together the Absentminded DBA’s Cheat Sheet?)

Happy days!

Currently there are "9 comments" on this Article:

  1. [...] This post was mentioned on Twitter by Jeremiah Peschka and Jen & Sean McCown, Jen & Sean McCown. Jen & Sean McCown said: Blog: Forgotten T-SQL Cheat Sheet http://tinyurl.com/2fzbkpe Why? Because we like you. [...]

  2. Nicely done…

    …but it would be better if it had the bane of my life, the PIVOT! I always have to take three runs at those!

  3. LadyRuna says:

    Neat cheat sheet, however it should have something that explains what certain items do because not only do we forget the syntax, we sometimes forget that we can use some of those instead of far more lengthy and CPU consuming alternatives. Looks like you’ve got to burn the Midnight oil and produce the SQL …er, Sequel.

  4. Jen McCown says:

    Well, it’s a cheat sheet…it’s kind of a reminder for after one aquaints oneself with the material at hand. For that, I have a handy-dandy recording of 24HOP :)

  5. [...] If you like this, you may also like my Forgotten T-SQL Cheat Sheet, which comes with a blog, the code and the 24HOP session [...]

  6. Fernando says:

    Hello, the link http://midnightdba.itbookworm.com/PublicDownload/CheatSheet.pdf doesn’t work. (404). Would you please fix it or re-upload the file?


  7. Robert Heinig says:

    In case there’ll be a V2 – the XML fragment (pun ok) should promote the “, type … .value(‘.’)” variant: Less gripes from people that reuse this without thinking and consequently missing their ampersands. And less CPU, too.

  8. […] still reference my Forgotten T-SQL Cheat Sheet, especially for the XML trick that turns a set of rows into a […]

Comment on this Article:

Minion Reindex by MidnightDBA is here!


Excellent Index Maintenance

Download Minion Reindex, log feature requests, read documentation, and sign up for the newsletter at MidnightSQL.com/Minion!


MidnightSQL Consulting

Need help? Got an emergency? Write us at Support@MidnightDBA.com!

We can schedule time to help with your backup/restore issues, high availability and disaster recovery setup, performance problems, and a great deal more. Very often, we're even available on the moment for downtime issues and emergencies.

For more information about MidnightSQL consulting, email us or check out www.MidnightSQL.com. Happy days!

Where are We?

November 3-7: PASS Summit, Seattle, WA

PASS Summit: Jen is presenting How to Interview a DBA: A Panel Debate on Thursday 11/6 1:30pm, room 401 (along with Adam Machanic, Sean McCown, Bob Pusateri, and Michelle Ufford).

PASS Summit: Sean is presenting Performance Tuning Your Backups on Wednesday 11/5 3:00pm, room 602-604.

December 11: Presenting "Powershell Cmdlets.." at Alaska SQL Server User Group

January 30: "Become an Enterprise DBA" precon at Austin SQL Saturday

Blog Posts by Category


How to Eat Pop-tarts
Watch DBAs@Midnight live on Fridays,m 11pm Central time

The best database career advice you’ve never heard!


The DBA Roadmap Seminar is 7 MP3 tracks (over 5 hours!) of insider guidance on your database career. We'll teach you how and what to study as a DBA, weigh in on controversial resume debates, teach you to recognize a worthy recruiter, and discuss the new professionalism of interviews. Also some bonus materials, PDF companion guides, and really spiffy intro music!

Once your $99 PayPal payment is submitted, you'll get the download link in e-mail! (Download is a 370Mb ZIP file.)

Become a DBA. Become a BETTER DBA. Use the Roadmap.

Visit www.DBARoadmap.com for info, forums, and more!

Add to Cart View Cart

Cunningham’s Law

"The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer."
Relevant: http://xkcd.com/386/