December 13, 2012 at 6:48 am
Hello guys,
I need to know ur best strategy how you learned Tsql, I know it will sound silly but I have started tsql lot of time but for some reason I just get lost in middle its not that i dont like it, I like it but somehow i feel I dont get proper resources sometimes its complicated english and sometime unncessary text..
I can write sql its not the case but given a task promt i dont get ideas right away, such as where should i join the table how i am going to use group by etc etc..coz i wont to know w good example that can tell me this is what happens inside sql sevrer engine or group by with daily llife examples. I need a book or tutorials like that and I need it badly guys...please share ur tactics and ur planning and how u learned, books names and links.....
Thanks in advance..............
December 13, 2012 at 7:20 am
Itzik Ben-Gan's T-SQL Fundamentals is quite good, and it has quite a few examples at the end of each chapter that also has the solutions so you can match it up.
I believe all the examples run against the Adventure Works database
There are a few others that Itzik has done, T-SQL Querying is another good book, there are others out there as well, or just keep browsing SSC and look at interesting problems and try and see how others have solved them.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
December 13, 2012 at 7:33 am
Anything written by Itzik Ben-Gan
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 13, 2012 at 7:34 am
I started with set/group theory and topology (part of a maths degree).
Then a relational databases course which was about the theory and included a lot of sql and relational theory and normalisation.
Then just practise (I found I was the team sql server expert on my next contract without ever actually having been near a database - had to be shown how to connect to a database and run a query).
Joe Celko's boks are worth a read (not Tsql specific) but will will gain a lot from forums and trying to answer questions (don't worry about being wrong).
Get used to testing small queries - populate a table variable or temp table and try things out. A lot of questions get asked when they could have been checked by just a few minutes testing.
Cursors never.
DTS - only when needed and never to control.
December 13, 2012 at 9:47 am
I second all those that said Itzek Ben-Gan. There are some great stairways on this site. I would say that Greg Larson's Stairway to DML and Celko's Stairway to Data are must-reads. For a real basic SQL overview take a look at W3Schools.
-- Itzik Ben-Gan 2001
December 13, 2012 at 4:55 pm
It is most important to learn by doing.
Read the forums and get ideas. Test your ideas, i.e., construct working queries.
Then see if you can think of variants that optimize performance. To do this you need test data, so a must read for setting up large amounts of test data are these two articles by Jeff Moden:
http://www.sqlservercentral.com/articles/Data+Generation/87901/
http://www.sqlservercentral.com/articles/Test+Data/88964/
If you'd rather use non-uniform random numbers in your test data, you could consult my article for some options: http://www.sqlservercentral.com/articles/SQL+Uniform+Random+Numbers/91103/
[/shameless-plug]
And as someone earlier said, don't hesitate to post suggestions to forum questions. The worst that can happen is that someone comes along later with a better solution that you can learn from. Once you've posted to the thread you'll get an email telling you someone else has too so it is easy to keep up with your favorite threads that way.
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
December 17, 2012 at 4:32 am
I read books only in English..and I have started to read Fundamentals Of T-SQL by Itzik Ben-Jan, I find it really Helpful thanks to "Jason-299789 " and other peole who suggested me this book.
i am going through it right now, I hope i will complete this book ...wish me luck 🙂
December 17, 2012 at 5:52 am
Glad to Help, and best of luck, if you have any questions drop them into SSC I'm sure people will be happy to help.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply