![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How do you combine two SELECT statements from two different tables into one result (assuming bioth tables have the exact same fields)? Like, assuming that the query SELECT * FROM Table1 gives the result ID Name 001 Smith 002 Jones and the query SELECT * FROM Table2 gives the result ID Name 247 Simpson 856 Beckley I want a SELECT ... ORDER BY ID statement that will output the following data: ID Name 001 Smith 002 Jones 247 Simpson 856 Beckley How do I do this? |
#3
| |||
| |||
|
|
On Jul 7, 2:59 pm, dwightarmyofchampi... (AT) hotmail (DOT) com wrote: I want a SELECT ... ORDER BY ID statement that will output the following data: ID Name 001 Smith 002 Jones 247 Simpson 856 Beckley How do I do this? select id, name from table1 union select id name from table2 order by id |
#4
| |||
| |||
|
|
How do you combine two SELECT statements from two different tables into one result (assuming both tables have the exact same fields [sic])? |
![]() |
| Thread Tools | |
| Display Modes | |
| |