Results 1 to 3 of 3

Thread: Full outer join in mysql

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2007
    Posts
    912

    Full outer join in mysql

    i have this sql query, i know this query is written in bad way, anyone can refine this sql query?

    Code:
    SELECT column, ship, column, column, column, column FROM tbl_W WHERE id = id AND mid = ''  UNION SELECT column, ship, column, column, column, column FROM tbl_W WHERE id = id AND mid IS NULL  UNION SELECT column, ship, column, column, column, column FROM tbl_W WHERE d_id = id AND i_sh = '1' order by id DESC
    in above query i have a column (ship) it has number values which is ID of another table's (tblShip) record.

    now in my sql result i want another column of (tblShip) (column_name) to be returned in place of (ship)[numeric value]

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Full outer join in mysql

    You should not DOUBLE POST - this thread needs to go away

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Full outer join in mysql

    Since the questions appear identical other than the subject line, I've closed this thread. Duplicate threads do no more than cause confusion and frustration.
    My usual boring signature: Nothing

Posting Permissions

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



Click Here to Expand Forum to Full Width