September 11, 2008 at 3:01 am
i have two table like the following:
name course
------- ---------
mahmoud c++
osam java
and the second column as the following:
name course1
--------- ---------
mahmoud db
osama c#
najeeb vb.net
yahya xml
please help me to make the following result
name course course1
--------- ---------- ------------
mahmoud c++ null
osama java null
mahmoud null db
osama null c#
najeeb null vb.net
yahya null xml
thank you
September 11, 2008 at 3:14 am
Assuming the two tables are tableA and tableB you can do:
SELECT name
, course
, NULL AS course1
FROM tableA
UNION ALL
SELECT name
, NULL AS course
, course1
FROM tableB
Regards,
Andras
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy