#1
  1. No Profile Picture
    Dani Zilcsak
    Guest
    Devshed Newbie (0 - 499 posts)
    I have two tables having identical columns. I want to display a list of all the records in the two tables. Is there a SQL command I can use ? (like UNION)
  2. #2
  3. No Profile Picture
    donarb
    Guest
    Devshed Newbie (0 - 499 posts)
    Since MySQL doesn't yet support UNION, I found that I have to do a bit of fakery to accomplish this. I create a third table with the same attributes as the first two tables. Then issue "insert into table3 select * from table1;" and "insert into table3 select * from table2;". Then "select * from table3;" gives me all of the records.

    Don

Similar Threads

  1. Why is outer join so much slower than inner join?
    By VitalyB in forum MySQL Help
    Replies: 2
    Last Post: October 11th, 2003, 07:44 PM
  2. Problems with INNER JOIN
    By Kevin Andreshak in forum MySQL Help
    Replies: 1
    Last Post: July 19th, 2003, 02:07 AM
  3. Replies: 1
    Last Post: April 14th, 2003, 11:36 AM
  4. 2 tables LEFT JOIN(?) to 1 other table
    By miked2miked in forum MySQL Help
    Replies: 0
    Last Post: March 31st, 2003, 02:37 PM
  5. SELECT where data is comma delimited..
    By Robert_J_Sherman in forum MySQL Help
    Replies: 29
    Last Post: June 28th, 2001, 11:29 AM

IMN logo majestic logo threadwatch logo seochat tools logo