union [message #330492] |
Mon, 30 June 2008 05:11  |
convey05
Messages: 43 Registered: December 2007 Location: CHENNAI
|
Member |
|
|
Hi,
I have two tables like the below mentioned structure.
CREATE TABLE TEST_DUMMY1(NO NUMBER,NAME VARCHAR2(40),AGE NUMBER,ID NUMBER);
CREATE TABLE TEST_DUMMY2(NOO NUMBER,NAMEE VARCHAR2(40),MARK1 NUMBER);
I have inserted record in both the tables
when i queried the table using union
SELECT NO,NAME,AGE,ID,NULL MARK1 FROM TEST_DUMMY1 WHERE NO=1
UNION
SELECT null NO, null NAME,NULL AGE,NULL,MARK1 FROM TEST_DUMMY2 WHERE NOO=1
I got the output as
NO NAME AGE ID MARK1
1 a 1 1
100
The output is shown in 2 rows. i need the output in one row.
what to be done?
kindly provide me a solution
Thanks in advance
|
|
|
|
Re: union [message #330500 is a reply to message #330495] |
Mon, 30 June 2008 05:21  |
rajatratewal
Messages: 507 Registered: March 2008 Location: INDIA
|
Senior Member |
|
|
convey05 tell me one thing what UNION clause actually do??
Why you are using UNION in this.
Regards,
Rajat Ratewal
|
|
|