MySQL Database Tutorial - 22 - How to Join Tables

Поделиться
HTML-код
  • Опубликовано: 16 янв 2012
  • Source Code: github.com/thenewboston-devel...
    Core Deployment Guide (AWS): docs.google.com/document/d/16...

Комментарии • 191

  • @Kreed1910
    @Kreed1910 3 года назад +62

    8 years later, your tutorials still helps students

    • @DeejayFlylight
      @DeejayFlylight 2 года назад

      Not just students, admins in education too! :D

    • @bezelyesevenordek
      @bezelyesevenordek 2 года назад

      i think sql is not really changed over the years, i'm new to mysql btw. just an assumption. so it can help no matter what year it is as long as it is not changing. sorry for my bed england

    • @DailyDee459
      @DailyDee459 Год назад

      not just 8, 12

    • @mahersabit9265
      @mahersabit9265 Год назад

      @@bezelyesevenordek really, cause it looks completley different from the mysql i use

  • @cod3ddy74
    @cod3ddy74 Год назад +12

    10 years later, your tuts are still helping students

  • @peristiloperis7789
    @peristiloperis7789 9 лет назад +5

    It's been a long time since I watched a Buck's video for the first time, but the feeling remains the same: you're the best, man!

  • @FleurOlivia
    @FleurOlivia 8 лет назад +43

    Omg I finally get this now thank you, I should mention you in my graduation speech. If I ever complete Computer Science it will be solely because of you.

    • @Handleme23
      @Handleme23 5 лет назад +2

      FleurOlivia did you finish?

    • @ShreenathSiriyala
      @ShreenathSiriyala 4 года назад

      So did u graduate lol

    • @Augass
      @Augass 3 года назад

      dude come back and tell us!

    • @antoniofuller2331
      @antoniofuller2331 3 года назад

      Looks like she didn't graduate. LMAO

    • @hanac5586
      @hanac5586 2 года назад

      We will never know, seems like a dead channel lol

  • @nadeemyunus7780
    @nadeemyunus7780 5 лет назад +4

    Bucky I don't know how should I thank you. You put real efforts into making these videos as understandable as they are for us. Your tutorials have helped me learn Mysql within only a couple of days. I just wish a long healthy life for you. God bless you & thank you!

  • @Pic4real
    @Pic4real 7 лет назад +3

    You are a life saver. I was doing the tutorial from W3Schools and I was completely in the dark when I got to the Joins section, I didn't understand how to do it. Your tutorial made it VERY easy to understand. Thanks a bunch, I've liked and subscribed and I'll be sure to follow your tutorial from now on.

    • @freepalestine_stop_genocide
      @freepalestine_stop_genocide 7 лет назад +1

      No one teaches better than him.
      Ive learned Python, and now this. All of the tutorials are just the best on the internet.

  • @Platoface
    @Platoface 6 лет назад +1

    Excellent tutorial. I’ve been writing queries for a month and this will really help me. Thank you.

  • @monzerfaisal3673
    @monzerfaisal3673 Год назад

    11 years later your tuts are still helping students!

  • @Sink_Bread
    @Sink_Bread 9 лет назад +1

    You helped me out a LOT. Your whole youtube page is great for learning some stuff before a test. Thank you ^^

  • @madshansen1020
    @madshansen1020 7 лет назад +3

    Wow, you have a really good way of explaining the logic of the sql world. Thanks for the video !

  • @jeremy2s
    @jeremy2s 9 лет назад +1

    This really helped me out with a custom query I needed for a site. Thank you for posting!

  • @stevenlane6963
    @stevenlane6963 7 лет назад +28

    This guys knowledge knows no bounds!!

  • @NA0S90
    @NA0S90 9 лет назад

    So many videos out there on joins. This one is my favourite!

  • @tinax9952
    @tinax9952 7 лет назад +1

    I've looked at a lot of MySQL videos, and this video has very good explanations. Also, its nice that you have some humor too. Thanks!

  • @samtran1434
    @samtran1434 6 лет назад

    bucky, this video helped me tremendously. the way you explained it is exceptional.

  • @tenjin09
    @tenjin09 11 лет назад

    dude, thenewboston, you saved my butt this semester. Thanks for your help on java and mySQL. I can't find any good information on these programs. It seems like everyone is keeping the actual code a secret. Thanks man

  • @MrCommandoWarrior
    @MrCommandoWarrior 12 лет назад

    Awesome!I'm looking forward to your more advanced tutorials for my school work

  • @aldrinjohnencina6153
    @aldrinjohnencina6153 Год назад

    11 years earlier, still helping students. thank you so much

  • @savagenoble269
    @savagenoble269 8 лет назад +14

    Why can't production databases be this entertaining?

  • @thatChillLife2037
    @thatChillLife2037 Год назад

    this was super helpful! Thanks for taking your time, explaining, and then showing as you go :)

  • @Dexter101x
    @Dexter101x 10 лет назад +1

    Good stuff dude, thanks for your clear and concise tutorial on this

  • @insencia
    @insencia 9 лет назад

    you are the man. i've been knocking myself out for 24 straight hours trying to figure out my query and you nailed it in 8 minutes! i am in ore of you lol

  • @Adventpenguin
    @Adventpenguin 11 лет назад

    Thank you very much for this video, I am an intern for a computer games company and the only task I got is to program a database for the products that the company sells. I have been trying to understand joins for 3 month now and now I finally made it thanks to this tutorial.

  • @devingaferno9317
    @devingaferno9317 8 лет назад +2

    Great tutorial! I would also like to know if its possible to turn the results into a new table in the database display on a site using php. Thank you

  • @westfield90
    @westfield90 6 лет назад

    I love how you explain in real life examples

  • @jaysuthar1211
    @jaysuthar1211 8 лет назад

    Thank you so much Bucky your tutorials made it so easy to understand than those hours long lecture.

  • @MicahJohns
    @MicahJohns 4 года назад

    Thank so much man, longtime watcher!

  • @sexynpcb
    @sexynpcb 12 лет назад +2

    I enjoy your database tutorials. I was so confused prior to watching them. Thank you so much! My problem is finding all that relate to queries (of yours) all in one place. Any suggestions?

  • @Vitoman123
    @Vitoman123 8 лет назад

    Thank you , tutorial is very clear . I have hearing problem and I couldn't understood a single word you were speaking , but I know this now.

  • @CreepypastaFiles
    @CreepypastaFiles 11 лет назад

    holy crap. Joins used to confuse the crap outta me. now I feel like a genius. thanks bucky!

  • @luiscarlosmartinez3034
    @luiscarlosmartinez3034 2 года назад

    Straight to the point. I love it!!

  • @EminoMeneko
    @EminoMeneko 12 лет назад

    Hey Bucky ! You goes so productive ! :O
    I discovered this new series perhaps yesterday and it was like tut number 7 and now you're already number 22 ! xD Anyway let's see that.

  • @mmelimahlobo7656
    @mmelimahlobo7656 Год назад

    Jesus this amazing thank you very much I was really stuck

  • @rturae
    @rturae 9 лет назад +150

    Anyone else laugh at "used diaper from my sister"?

    • @divyanshgrover5207
      @divyanshgrover5207 8 лет назад +5

      +Vector Vent Me! I have been following his videos and this phrase has come up more than 10 times :P

    • @Anthony_in_Bloomington_Indiana
      @Anthony_in_Bloomington_Indiana 8 лет назад +1

      Hee hee, that is ... unusual ... to say the least.
      And this example is for selling pretend things on Ebay. So who does he think is going to buy a used diaper?

    • @omiorahman6283
      @omiorahman6283 5 лет назад

      @Mc Ezra yu forgot manufacted BOWs

    • @omiorahman6283
      @omiorahman6283 5 лет назад

      @Mc Ezra it's true medical companies make artificial virus for $$

    • @zerosandones7547
      @zerosandones7547 5 лет назад +1

      0 bids though AHAHHAH

  • @leetkhan
    @leetkhan 3 года назад +1

    8 years old still saving the day

  • @GaryTube18
    @GaryTube18 11 лет назад

    i'm new to mysql and this helped me so much! thank you!

  • @cgailfugate
    @cgailfugate 4 года назад

    Love this dude! Thanks Bucky! I wish you were my instructor. :-)

  • @jasonstryker196
    @jasonstryker196 4 года назад

    This is is video should be more popular. About to get that A now

  • @ReZo1064
    @ReZo1064 11 лет назад

    Best join tutorials .Bucky is the best online teacher .i ve learned java,c++,javascript and now sql thanks to him .ty dude

  • @ThomasKingo1
    @ThomasKingo1 10 лет назад

    This could really come in handy! Thanks :)

  • @haider4899
    @haider4899 8 лет назад

    joins are probably the trickiest part of mysql. thanks for explaining

    • @LihimSidhe
      @LihimSidhe 8 лет назад

      +Haider Ali Khichi : I agree. have you made any headway?

  • @TECLOVENIA
    @TECLOVENIA 3 года назад

    Thank you very much for helping us bro 🙏

  • @venecialopez4297
    @venecialopez4297 12 лет назад

    Excellent tutorials. I just wanted to know how to join tables but now I want to watch all of your videos. Just one little advice: you should change your profile picture to a more professional one. These are formal videos so the people who's looking for them will choose the person who looks more professional and acknowledged. Anyway, keep it up! :)

  • @latavish
    @latavish 9 лет назад

    very good explanation. very clear and easy to understand

  • @programminglikeaboss5375
    @programminglikeaboss5375 4 года назад

    this is one of the best helpfull course that i was looking for in database relationship using phpmyadmin sir ..
    my greetings from africa specially djibouti

  • @TeluguTechMix_
    @TeluguTechMix_ 7 лет назад

    bucky bro now i found this is a little bit usefull tutorial thank you .

  • @Mont_Blanc_Photography
    @Mont_Blanc_Photography 3 года назад

    hiya, this makes a lot of sense, even for a beginner like me. Please could you tell me which software you are using to write your queries, and if this could be done for excel table joining, thanks.

  • @fidelbuds10
    @fidelbuds10 12 лет назад

    This is exactly what i need thanks thenewboston!

  • @emceeioana
    @emceeioana 11 лет назад

    great job bucky!! keep up the good work.

  • @rimpypannu9539
    @rimpypannu9539 7 лет назад

    Wow!! You explained it so well 👍👍

  • @destar1
    @destar1 5 лет назад

    THIS VIDEO SAVED MY LIFE

  • @vsop8114
    @vsop8114 8 лет назад

    What happens when the WHERE statement specifies two columns that have completely different information/does not match? Depending on the column I choose, I can get some output (instead of empty set) and trying to figure out why that is since the columns have different information.

  • @RobertKaydoo
    @RobertKaydoo 10 лет назад +2

    Great tutorial! Thank you for making a posting.
    I am still getting my head around joins and their purpose so please excuse a beginner's question: is the general purpose of a join to retrieve with a single query what might take 2 or more queries? Thanks again.
    Peace.

    • @koenbrink
      @koenbrink 10 лет назад

      joining tables is a complicated word for using two or more tables in one command

  • @Sintaxx2
    @Sintaxx2 11 лет назад +3

    I suppose you mean "items.seller_id". You definitely could do "items.seller_id" to explicitly specify in which table the 'seller_id' can be found but in this case there is no 'seller_id' in the 'customers' table so there is no ambiguity for the DBMS. He uses 'customers.id' because both the 'customers' and the 'items' table contain a column with the name 'id'. Hope this clarifies!

  • @laztcat
    @laztcat 10 лет назад

    you do a great jobs on your videos. Do you have anything on Php PDO security?

  • @rogerp.catamcojr.8483
    @rogerp.catamcojr.8483 Год назад

    I HOPE YOU ARE MY PROFESSOR

  • @briangicharu2899
    @briangicharu2899 2 года назад

    thenewboston unsung heroes

  • @dencio452
    @dencio452 9 лет назад

    can I put AND statement after the WHERE clause to put another related tables?

  • @jitendrasahu4875
    @jitendrasahu4875 9 лет назад

    Thank you sir ,Your vidio is really helped me

  • @jimmyd12349
    @jimmyd12349 6 лет назад

    hi, do you have the notes for each lecture, includes the queries and explanation?/thanks

  • @sajwal
    @sajwal 12 лет назад

    best join tutorils i ever saw

  • @Nemo7The7Pirate7
    @Nemo7The7Pirate7 3 года назад

    You have the best boss.

  • @TsylvesterJunior-el3zt
    @TsylvesterJunior-el3zt 3 месяца назад

    You got a new subscriber

  • @totleariss
    @totleariss 8 лет назад +11

    in the query at 6:29, is it also correct to write:
    WHERE customers.id = items.seller_id?

    • @esens5409
      @esens5409 8 лет назад +13

      +Philip Song yes, he didn't do items.seller_id since it was the only "seller_id" in all of the tables, so it couldn't be jammed up as it would be if he hadn't specified the table for "name" or "id"

    • @tkrudi
      @tkrudi 6 лет назад

      thank you wise stranger

    • @dayvs
      @dayvs 6 лет назад +1

      how about if I wat an specific id? how do you write it? for example, I wat to know all the items for customer id 13, how i idicate to select this specific ID o the WHERE command?

    • @lefrog3851
      @lefrog3851 6 лет назад +1

      did you ever find the answer cause i need it :P

    • @davidaguado23
      @davidaguado23 6 лет назад

      SELECT customers.id, customers.name, items.name, items.cost
      FROM store.customers, store.items
      WHERE customers.id=seller_id and customers.id = 13
      ORDER BY customers.id

  • @ahsanmoaaz957
    @ahsanmoaaz957 2 года назад

    Sir, when we are adds more than one tables using the where clause

  • @bhagyashreemore1045
    @bhagyashreemore1045 10 лет назад

    u can even save dis table using CREATE TABLE table_name as
    SELECT .....n d whole query ma question is how can u update dis join table because when i enter new values its not refelctd in ma join table..can u help me out in dis??

  • @ArdyAryan
    @ArdyAryan 10 лет назад

    Great tutorial, thanks

  • @nemnoton
    @nemnoton 9 лет назад

    Very well explained.

  • @shraddhatapase9349
    @shraddhatapase9349 6 лет назад

    How to do delete and update query using join please tell me

  • @UltimateGaming-ih
    @UltimateGaming-ih 2 года назад

    ty for the video!

  • @vJDiZZ
    @vJDiZZ 7 лет назад

    Can I put the joined tables together into a Permanent table?

  • @dkshahranharris9710
    @dkshahranharris9710 6 лет назад

    hello....juz want to ask....how to show output Address in one box for table add1,add2,add3,poskod,state....plz help me....tq in advanced

  • @guduguminchu
    @guduguminchu 11 лет назад

    Nice tutorial sir, thank you.

  • @pamtasy6267
    @pamtasy6267 5 лет назад

    Thank you :D it works!

  • @feot1000
    @feot1000 11 лет назад

    I never comment on videos, but THANK YOU.

  • @jocois
    @jocois 4 года назад

    One thing I dont get is that he pulled up the Customer.Name but the Seller.Name populated instead?

  • @AnthonyPaulT
    @AnthonyPaulT 6 лет назад

    Would it also mork if i say customers.id = items.seller_id?

  • @kusog3
    @kusog3 12 лет назад

    cool.. its been awhile since i watched your tutorials,
    ...anyways, this might be off topic but what do you guy think about the:
    Internet Blacklist Legislation>SOPA and PIPA? I came across this issue when I was looking for something at Wikipedia

  • @beharami4692
    @beharami4692 4 года назад

    my question is insert data in 2 table with 1 qurey is it possible??

  • @tag_of_frank
    @tag_of_frank 6 лет назад

    Why is seller ID not a foreign key of userId? Why is it named differently?

  • @mgeorgescu
    @mgeorgescu 9 лет назад

    Thank you! Amazing.

  • @xtiaan3
    @xtiaan3 12 лет назад

    How is the Seller ID matched to the User ID in the first place?

  • @a2000ei
    @a2000ei 6 лет назад

    i dont understand how he linked 'seller_id' to the original customer.id as i am just getting 0?

  • @Kwix
    @Kwix 6 лет назад

    How do you select a specific row? For example, I want to select a single user's info.

    • @psychedelicwolf9697
      @psychedelicwolf9697 5 лет назад

      SELECT column_name FROM tbl_name WHERE condition / condition with values. (values inside the the quotation marks)
      Eg.
      SELECT name FROM customers WHERE id = '1';
      Sorry for my informal english. Not my primary language. Also this is just one of the possible solutions that can work, there may be more and much effective.

  • @gvh1993
    @gvh1993 10 лет назад

    I have a question.. isn't it better to use the INNER JOIN & ON function?
    like this:
    SELECT c.id, c.name, i.name, i.cost
    FROM customers c INNER JOIN item i ON c.id = i.id
    ORDER BY c.id;

  • @vibrato17
    @vibrato17 12 лет назад

    @adrianqx Then you wouldn't need to be joining them in the first place. Join is just for linking the same thing multiple tables - In this case, the id of the seller, which is called id in customers, and seller_id in items. Both types of id represent the same person, the seller, so the tables can be joined via this column.

  • @jamesrobertsalud1443
    @jamesrobertsalud1443 5 лет назад

    thanks it works

  • @cali4484
    @cali4484 4 года назад

    what is the difference between this method and using "JOIN" ?

  • @abudoganae
    @abudoganae 6 лет назад

    keep doing this good thing

  • @localblackman427
    @localblackman427 7 лет назад

    why didn't you use the left join function?

  • @DarioVolaric
    @DarioVolaric 10 лет назад +27

    item: 'used diaper from my sister'??? LOL

    • @Viking102938
      @Viking102938 10 лет назад

      4:26
      Mofos must really need dem gem socks.
      ..also, how did they each bid (a minimum of 500 pennies) but the socks are under $3? People spending fraction pennies or somethin'?
      Some Scroogin' goin' on up in this 'ere :V

  • @adrianqx
    @adrianqx 12 лет назад

    what happens if 2 tables dont have any column in common ?

  • @kelvinz17
    @kelvinz17 11 лет назад

    uhmm, do you have a tut about joining more than 2 tables?

  • @AfndeenaCom
    @AfndeenaCom 12 лет назад

    Great work
    thanks a lot

  • @kaneezfatima2252
    @kaneezfatima2252 6 лет назад

    very nice video sir ,sir i have 2 table ,i want to joint both and view in one how can i joint this two
    table A) name,rollno,class,subject and table B) date ,attendance status , how to can joint this table ??? plz

  • @ZqckFair
    @ZqckFair 12 лет назад

    Fuck the boss, you're your own boss Bucky.

  • @AdrianOrig
    @AdrianOrig 10 месяцев назад

    whahaha this is still the best tutorial ever, "used diaper from my sister"

  • @Harris2Pretoria
    @Harris2Pretoria 11 лет назад

    HI Bucky, listen i get what you did.now how does one create a new table with the results on the query you executed

  • @amsalbusaidi89
    @amsalbusaidi89 10 лет назад +1

    Thanks :)

  • @LarsDreier
    @LarsDreier 11 лет назад

    Thank you so freakin' much!!