Inner Joins

  • Hello ! I was just wondering is there some sort of methodology that you would use with T-SQL inner joins when you have to join multiple or many tables in order to find a value. For example, I notice that some SQL statements can have many inner joins and I was just trying to wrap my head around whether there is a structured way to do this. Also are there any tools that can assist you with joining tables to get to a value you need. Thanks !

  • Ronnie65 - Sunday, May 6, 2018 2:08 PM

    Hello ! I was just wondering is there some sort of methodology that you would use with T-SQL inner joins when you have to join multiple or many tables in order to find a value. For example, I notice that some SQL statements can have many inner joins and I was just trying to wrap my head around whether there is a structured way to do this. Also are there any tools that can assist you with joining tables to get to a value you need. Thanks !

    There are several different types of joins and I suggest you start by learning about those. 
    😎

    One tool that can be handy is the visual query editor in SSMS.

  • Ronnie65 - Sunday, May 6, 2018 2:08 PM

    Hello ! I was just wondering is there some sort of methodology that you would use with T-SQL inner joins when you have to join multiple or many tables in order to find a value. For example, I notice that some SQL statements can have many inner joins and I was just trying to wrap my head around whether there is a structured way to do this. Also are there any tools that can assist you with joining tables to get to a value you need. Thanks !

    In addition to what Eirikur has to say, one also has to take into account the actual path to the data that is needed.   If you don't understand how the tables link the data together, no tool on the planet is going to do much more than follow foreign keys.   Not every data relationship between tables is implemented in the database with a foreign key relationship, and because of that, a tool isn't going to be able to ferret out ALL such relationships.   Even where column names are common across tables, all such a tool can do is "suggest " that there "may" be a relationship there.   You still have to know your data and it's structure; and ideally, the "why" behind the design of the tables.   Not every actual database has been implemented with "good" design, and in many cases, compromises may have been made to balance various user experience and database performance goals, where all goals might not have been easily achievable together in a reasonable time frame.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 3 posts - 1 through 2 (of 2 total)

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