how sql matter gets law around charge table? (many many)


i have 3 tables (archive sections, domain (may) go archives):




  • archive




    • id pk

    • description


  • archive_to_section




    • archive_id pk fk

    • section_id pk fk


  • section




    • id pk

    • description




what sql feeling list sections go certain repository id?



i am only training sql. i've review sounds i need join, union? fyi i'm controlling postgres.






[edit] answer gdean2323 combined but aliases:



select section.* 
from domain
inner join archive_to_section
on section.id = archive_to_section.section_id
where archive_to_section.archive_id = $this_archive_id


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?