Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Can it Joined two tables like this?

Can it Joined two tables like this?

Scheduled Pinned Locked Moved Database
databasequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jason_mf
    wrote on last edited by
    #1

    Table A : id name sid jid Table B: bid img sid jid select A.id,A.name,A.sid,A.jid,B.bid,B.img from A left outer join B ON A.sid=B.sid AND A.jid=B.jid I wrote sql like this. is right? "ON A.sid=B.sid AND A.jid=B.jid" is key.

    K 1 Reply Last reply
    0
    • J jason_mf

      Table A : id name sid jid Table B: bid img sid jid select A.id,A.name,A.sid,A.jid,B.bid,B.img from A left outer join B ON A.sid=B.sid AND A.jid=B.jid I wrote sql like this. is right? "ON A.sid=B.sid AND A.jid=B.jid" is key.

      K Offline
      K Offline
      Krish KP
      wrote on last edited by
      #2

      Yes. This usage is porper, to check for multiple columns.

      Regards KP

      J 1 Reply Last reply
      0
      • K Krish KP

        Yes. This usage is porper, to check for multiple columns.

        Regards KP

        J Offline
        J Offline
        jason_mf
        wrote on last edited by
        #3

        Thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups