Querying Multiple Tables with SQL

Ғылым және технология

Demonstration of how to query two or more tables with SQL Server.

Пікірлер: 67

  • @BudGooey
    @BudGooey5 жыл бұрын

    This is the first link out of about twenty different pages that actually helped me solve my issue.

  • @Southwestmo

    @Southwestmo

    3 жыл бұрын

    Can you select the primary id itself?

  • @dzunisanithemba99
    @dzunisanithemba997 күн бұрын

    Thank you for the simplicity.

  • @anujdhumal9114
    @anujdhumal91144 жыл бұрын

    thank you very much for this video, i was stuck at one query ,and searched many videos and finally find accurate concept.

  • @reghuk
    @reghuk4 жыл бұрын

    Thank you man, you're a Gentleman and a scholar!

  • @sanjeevKumar-eg6hp
    @sanjeevKumar-eg6hp3 жыл бұрын

    Thank you sir for wonderful explanation, It was very clear and anyone who watches the video can easily understand the concept It helped solve one of major obstacle in sql

  • @oatie4262
    @oatie42622 жыл бұрын

    Can't believe this only has 752 views when the content is so good. Thank you so much, this is waaaay clearer than what I was learning in school! Sharing it with my classmates!

  • @mememusician8780

    @mememusician8780

    Жыл бұрын

    not 752 views anymore

  • @babakiani
    @babakiani3 жыл бұрын

    Thank you Larry! This content was really useful!

  • @MXVMichael
    @MXVMichael2 жыл бұрын

    I’m going to give to a try when I get to work 👍🏾👍🏾👍🏾Thanks buddy!

  • @115advitiya
    @115advitiya2 жыл бұрын

    You really saved my behind with this video

  • @julianmac
    @julianmac3 жыл бұрын

    Thanks, actually helped me so much.

  • @rodrigoalejandrogallardoga5812
    @rodrigoalejandrogallardoga58124 жыл бұрын

    THANK YOU, very helpful and nicely explained.

  • @kienolaliwatari9610
    @kienolaliwatari96102 жыл бұрын

    Thank you so much for this, it was really informative and helpful

  • @AbinashMishra
    @AbinashMishra3 жыл бұрын

    awesome keep going larry we need you, searched everywhere got a good explanation here. Eggactly what I need \m/ a 2016 video helping in 2021

  • @Alfredo5883

    @Alfredo5883

    3 жыл бұрын

    Same here. People should do more tutorials on DML, bcos thats the core of having to learn sql

  • @TheSQLGuy
    @TheSQLGuy5 жыл бұрын

    Great video! Really informative

  • @jansen6583
    @jansen65835 жыл бұрын

    Thanks man I was wondering why my query was taking so long.

  • @reeceytaylor
    @reeceytaylor6 жыл бұрын

    thanks, this helped me a lot

  • @readysetsuccess
    @readysetsuccess2 жыл бұрын

    Just in time learning. Thanks!

  • @i_declare_bankruptcy686
    @i_declare_bankruptcy6862 жыл бұрын

    I think learning stuff on KZread must be considered formal learning and I should be able to add that I know something I learnt from a KZread tutorial on my resume.👌😂

  • @drdoughnut38
    @drdoughnut385 жыл бұрын

    You're a beast this is exactly what I needed!!

  • @ecxlv
    @ecxlv4 жыл бұрын

    brilliantly explained sir

  • @smurfmoniquii
    @smurfmoniquii4 жыл бұрын

    You are a lifesaver thanky ou!!!!

  • @KumarAnalytic
    @KumarAnalytic5 жыл бұрын

    Thanks sir.good explained

  • @balajir4448
    @balajir44485 жыл бұрын

    Thank you, very useful

  • @ayanshaikh4993
    @ayanshaikh4993 Жыл бұрын

    Thanks Larry

  • @EuanMcG
    @EuanMcG3 жыл бұрын

    You are my hero

  • @januarekosubagio5525
    @januarekosubagio55257 жыл бұрын

    in my case, I have 12 tables and I don't know how to join these tables. it looks simple but it is also complicated. I hope you can help me with this, anyway you did a great job keep it up sir ! thanks

  • @reeceytaylor

    @reeceytaylor

    6 жыл бұрын

    you have to select your data and then when using the FROM query you type in the tables like this: FROM table 1, table 2, table 3 etc.

  • @tonystites2134
    @tonystites21346 жыл бұрын

    how do you create a new table from that I tried Create Table tablename AS but it did not work

  • @vamsireddy5051
    @vamsireddy50515 жыл бұрын

    What about performance if you are using where conditions and join conditions? We know joins performance is good compare to where condition. Please let us clarify.

  • @wastedart1794
    @wastedart17943 жыл бұрын

    Thx you Larry this is definetly getting me in the rigte direction, but im trying to join for tabels its very hard, to get them connected or maybe i just need to improve myself, thx you anyway :)

  • @LarryDomine

    @LarryDomine

    3 жыл бұрын

    It may not be you. Writing good SQL statements is dependent upon having a well designed database. The better the design the easier it is to retrieve the data. Checkout my video on using JOIN statements: kzread.info/dash/bejne/lmeZkratgNbdfpM.html

  • @wastedart1794

    @wastedart1794

    3 жыл бұрын

    @@LarryDomine i will I agree I had to rework my dB and It fixed it all 😁 so now I am hammered, the problem got solved

  • @harinath8938
    @harinath89382 жыл бұрын

    good explanation very useful, but can you explain same as well as with 3 or more tables

  • @LarryDomine

    @LarryDomine

    2 жыл бұрын

    Glad this video helped. The same sequence can be applied to more tables in a 'stacking' configuration. The key is to remember that you are taking data from a table to create its own virtual table that is used by another join statement. If there are a lot of joins to stacked, it may be due to a poor database design. Here is a link that may help you understand this process: codingstatus.com/sql-join-4-tables/

  • @fitsumarja5865
    @fitsumarja58652 жыл бұрын

    thanks for your commitment and i would like to ask a question. which is when i execute exact same command(esp. the first one) it only fetches the column names only.

  • @LarryDomine

    @LarryDomine

    2 жыл бұрын

    Data has to be in the table to be able to obtain anything more than the column names. Run some INSERT INTO statements to insert data into the tables.

  • @fahadm3444
    @fahadm34446 жыл бұрын

    I am trying to pull data from three tables but running into a relation issues. Table1: Customer Table. Table 2: Invoice Table Table 3: Invoice Detail Table On table 1 the customer number column is "BPCNUM_0" On Table 2: The customer number column is "BPR_0" On Table 3: The customer number column is "BPCINV_0" Any idea how I can connect them to pull the data?

  • @jaysanghavi8248
    @jaysanghavi82484 жыл бұрын

    Tysm☺️

  • @sltech837
    @sltech8373 жыл бұрын

    Good video

  • @soldadopreciso
    @soldadopreciso5 жыл бұрын

    how enable ssms to see two result tables in the same windows

  • @craigbaggley6047

    @craigbaggley6047

    4 жыл бұрын

    1. Select * from 2. Select * from Highlight both and execute.

  • @danielflamebrown5426
    @danielflamebrown54263 жыл бұрын

    Thank you...

  • @jamarwilson3592
    @jamarwilson35922 жыл бұрын

    Can someone help me? at 5:25 he creates a - function next to select that corresponds to the block of code. How do I incorporate that? At the moment I can only answer 1 query.

  • @LarryDomine

    @LarryDomine

    2 жыл бұрын

    At the point in the video more SQL statements are being used, not a function. Here is another video with an overview of SQL Statements kzread.info/dash/bejne/nIuMmZqwo62ze5M.html

  • @surabhisunil21
    @surabhisunil214 жыл бұрын

    is it possible to give a user defined column in jdbc?

  • @LarryDomine

    @LarryDomine

    4 жыл бұрын

    Kind of....It is all about what data is needed in the relational database. A 'user defined column' is often a column in a relational database table where the user can enter any data they would like, as long it is of the correct datatype for the column. In a relational database management system, the importance is to collect data that can be queried to provide information. This then relates to collecting facts, such as name, address, income, favorite color, etc. There are times when data associated with an entity may not be easily defined, such as comments, opinions, analysis, etc. The data to be input to this column would not be easily defined answers are what can be considered a 'user defined column'.

  • @cd78
    @cd785 жыл бұрын

    Larry do you still have visibility over these comments

  • @umangternate
    @umangternate3 жыл бұрын

    Can this method be applied to update and delete data from multiple tables?

  • @LarryDomine

    @LarryDomine

    3 жыл бұрын

    Kind of.... Keep in mind that UPDATE and DELETE have their own syntax requirements. Here is an example I found from someone else to consider. stackoverflow.com/questions/2044467/how-to-update-two-tables-in-one-statement-in-sql-server-2005

  • @nileshmandlik9662
    @nileshmandlik96622 жыл бұрын

    more videos like this

  • @gamer4lyfez325
    @gamer4lyfez3255 жыл бұрын

    why would you force 1080p ??

  • @jbhargav7181
    @jbhargav71812 жыл бұрын

    Can we use IN operator by using two tables

  • @LarryDomine

    @LarryDomine

    2 жыл бұрын

    Yes

  • @pratibhalohiya9874
    @pratibhalohiya98742 жыл бұрын

    i have a ques that we create one database and in one database we can create only one table . how ur database productorder included soo many tables ...???

  • @LarryDomine

    @LarryDomine

    2 жыл бұрын

    One possible reason is you may not have permission to create tables in the database management system you are using. Check that out. If you have authority to create tables, you can use the tools in the database management system software, or you can write CREATE statements. docs.microsoft.com/en-us/sql/relational-databases/tables/create-tables-database-engine?view=sql-server-ver15

  • @yeyeTF2
    @yeyeTF24 жыл бұрын

    starts at 4:05

  • @pulkitlanjewar8454
    @pulkitlanjewar84542 жыл бұрын

    Description There are 2 datasets present in the file. Data 1 and Data 2 The primary key for both data1 and data2 is Order Id + Product ID combination (i.e. the individual datasets do not have any duplicate on this combination) Provide solution and approach for the following: How to identify the Records (Order ID + Product ID combination) present in data1 but missing in data2 (Specify the number of records missing in your answer) How to identify the Records (Order ID + Product ID combination) missing in data1 but present in data2 (Specify the number of records missing in your answer) Find the Sum of the total Qty of Records missing in data1 but present in data2 Find the total number of unique records (Order ID + Product ID combination) present in the combined dataset of data1 and data2 Allowed Tools SQL

  • @Myself_9037
    @Myself_903711 ай бұрын

    I have a doubt. I have table with two fields, one field is array in table 1 uID | Contact 2 | 1221,1223 3 | 1123 Now value of 1221 and 1223 are in table Two. I want a query to join table 1 and table 2 using array of field2

  • @LarryDomine

    @LarryDomine

    11 ай бұрын

    Not sure what it is you need to do. A JOIN is based upon joining tables based upon a the data in a common field (normally a primary key and foreign key). This creates a 'virtual table'. separate

  • @LarryDomine

    @LarryDomine

    11 ай бұрын

    Here is a link with more information: dataschool.com/how-to-teach-people-sql/sql-join-types-explained-visually/

  • @arslanali1346
    @arslanali13463 жыл бұрын

    Please I have a few questions which I need help with. For these I have the tables ready but I am not sure if my queries are right. All the tables that I need are in section 1 which are done and completed. But for the queries from these tables are so confusing. I want to show you what I have done could you please show me if they are right . Please reply me if you can help me. I will send you all the queries I have done in the morning if you are ready to help me. Thank you God bless you. Kind regards Arslan

  • @LarryDomine

    @LarryDomine

    3 жыл бұрын

    The demonstration in the video is for simple SELECT statements for use with mulitiple tables. When writing a query (SELECT statement) always work in reverse. Start with what data you would like to see as the result of the data. Then identify what table(s) this data will come from. This works for most queries in a well defined database. However, evaluate if this data and the tables they are in will need other types of Joins, Unions, or Sub Select statements from which to take the data from. Here is a link that I found that may help provide further information: www.essentialsql.com/a-case-study-on-how-to-use-joins-subqueries-and-unions-to-combine-data-in-sql/

  • @itreportcambodia8283
    @itreportcambodia82833 жыл бұрын

    hello b

Келесі