Best way to learn T-SQL for MS SQL Server?

  • Hello Everyone,

    At work, I've been getting more involved with hosting and database stuff. I currently do some very minor admin work with my limited SQL knowledge from college 11 years ago, but I'd like to expand my abilities in this area. It's all Microsoft SQL Server, so apparently it's Transact-SQL.

    As someone who went to school for programming, but never ended up working as a programmer, what books or web sites would you recommend for me to get acquainted with T-SQL? I'm looking for more of an introductory-level resource, which can prepare me for something more advanced once I'm comfortable. To give you an idea of my current knowledge and understanding, I struggle with understanding JOINs, and wouldn't be able to write my own stored procedure.

    Thanks very much.

  • If you have difficulty understanding joins you may want to start with a basic general SQL tutorial:

    https://www.w3schools.com/sql/

    If you want to learn t-sql you can read Itzik Ben-Gan's books. Maybe start with:

    https://www.microsoftpressstore.com/store/t-sql-fundamentals-9781509302000

    If you are interested in production DBA work, Brent Ozar has an outline DBA training plan:

    https://www.brentozar.com/archive/category/production-database-administration/dba-training-plan/page/2/

  • "Best way to learn T-SQL for MS SQL Server"?

    Start at the beginning.  See the following link with the understanding that it does cover more than just T-SQL and some of the functionality is not available in T-SQL  It's one of the best "start here" tutorials that I've found.

    https://www.w3schools.com/sql/default.asp

    A bit of a warning... UPDATE in T-SQL is quite different than some of the other database engines and the tutorial does NOT cover that (Joined Updates/Updating one table from another).

    Also, if you want to see a list of what's in SQL Server, they have a list on the left size if you scroll all the way to the bottom to see it.

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • This was removed by the editor as SPAM

  • Thank you for the advice of great books. Very useful for me. I think https://www.w3schools.com/sql/ is a good guide. I would like to ask where exactly in the programming school did you study? I think you can learn T-SQL for MS SQL Server in programming school and ask questions at the same time. It seems to me that teachers can explain things much better than books, which are quite hard to find answers in. If you have problems with basic training, I also have options to save time on writing lab reports or any other jobs. You can use https://ca.edubirdie.com/lab-report-writing-services for studying and learning T-SQL for MS SQL Server at the same time. Proboaly this service will be very useful for you. Good luck and have fun learning.

    • This reply was modified 1 year, 9 months ago by  Annie_Weaver.
  • Annie_Weaver wrote:

    Thank you for the advice of great books. Very useful for me. I think https://www.w3schools.com/sql/ is a good guide. I would like to ask where exactly in the programming school did you study? I think you can learn T-SQL for MS SQL Server in programming school and ask questions at the same time. It seems to me that teachers can explain things much better than books, which are quite hard to find answers in. If you have problems with basic training, I also have options to save time on writing lab reports or any other jobs. Good luck and have fun learning.

    I think that most schools on the subject of SQL Server and programming in SQL are horrible.  I'll never forget one of the questions I asked... "How can I find dupes in a table"?  The answer was, "Well, if you've done everything correctly, you won't have dupes in a table".  When I pressed on to explain the data was in a staging table from a file import and one of the things I was trying to do was to remove the dupes, the instructor could NOT tell me how.  He mumbled something about using a WHILE loop (definitely NOT the way to do such a thing) and walked away.

    I also find that no one that I've met actually teaches the TRUE basics of SQL.  For example, what is a relational database actually?  I haven't found anyone yet that can answer that simple question accurately nor simply.  I ask the same question about SELECT.  What is it actually?  Again, I've found that no one that teaches such a thing nor can even answer that question correctly, especially for those that already have programming experience.  And all of those questions can be answered in a single relatively short statement for each.

    Even fantastic beginner tutorials like W3Schools totally miss what I'm talking about.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply