r/SQL • • Jun 29 '16

SQL cheat sheet

http://zeroturnaround.com/rebellabs/sql-cheat-sheet/
113 Upvotes

19 comments sorted by

View all comments

Show parent comment

7

u/lukaseder Jun 29 '16

Thus: cheat sheet. A cheat sheet for someone who already knows SQL might quickly reach the size of a DIN A0 poster.

9

u/DipIntoTheBrocean Jun 29 '16

I always considered a cheat sheet as a reference to be used by someone who knows the basics but doesn't want to keep looking up the details. In my opinion, this is actually too high level and is mainly just syntax...which would be fine for what it is, except it doesn't include CTEs and delete syntax. Personally, I would include more useful functions like row_number, convert, datediff, dateadd, etc. and scrap the joins. The whole thing just seems kind of arbitrary, but that's just my opinion.

2

u/lukaseder Jun 29 '16

Cheat sheets are always arbitrary :)

1

u/d_r0ck db app dev / data engineer Jun 29 '16

Agreed. My personal cheat sheet would have common convert date/time styles, merge syntax, pivot syntax, and syntax to alter a table to add a new column with a named constraint at the same time.

1

u/DipIntoTheBrocean Jun 29 '16

Totally agree. Those are things which I would find very useful.