Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: sql join query

  1. #1
    New Coder thindrakhya's Avatar
    Join Date
    Jun 2007
    Posts
    90
    Thanks
    8
    Thanked 0 Times in 0 Posts

    sql join query

    hi ,


    e.g this is my query

    USE pubs
    SELECT a.au_fname, a.au_lname, p.pub_name
    FROM authors a LEFT OUTER JOIN publishers p
    ON a.city = p.city
    ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC


    i want to know what is the difference if i use

    ON p.city = a.city

    insted of ON a.city = p.city

    Because i have been using the first option
    where the join table field = parent table field

    But now i have read on internet and they have used the scond case

    I am confused Please help

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    No difference.

  • Users who have thanked Fumigator for this post:

    thindrakhya (11-09-2007)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •