How do I stop thinking every query in terms of cursors, procedures and functions and start using SQL as it should be? Do we make the transition to thinking in SQL just by practise or is there any magic to learning the set based query language? What did you do to make the transition?
Advertisement
Answer
A few examples of what should come to your mind first if you’re real SQL geek:
-
Bible concordance is a
FULLTEXTindex to theBible -
Luca Pacioli‘s Summa de arithmetica which describes double-entry bookkeeping is in fact a normalized database schema
-
When
Xerxes Icounted his army by walling an area that10,000of his men occupied and then marching the other men through this enclosure, he usedHASH AGGREGATEmethod. -
The House That Jack Builtshould be rewritten using a self-join. -
The Twelve Days of Christmasshould be rewritten using a self-join and aROWNUM -
There Was An Old Woman Who Swallowed a Flyshould be rewritten usingCTE‘s -
If the
European Unionwere calledEuropean Union All, we would see27spellings for the wordeuroon a Euro banknote, instead of2.
And finally you can read a lame article in my blog on how I stopped worrying and learned to love SQL (I almost forgot I wrote it):
And one more article just on the subject: