Home » SQL & PL/SQL » SQL & PL/SQL » with out union
with out union [message #204814] Wed, 22 November 2006 04:09 Go to next message
anithalakshmi
Messages: 9
Registered: August 2006
Junior Member
Hi all,

I have two tables as shown below

emp
---
empno | ename
--------------
1 aa
2 jjj
3 hhh


emp1

empno | ename
--------------
1 aa
4 jjjj


I want a select query with out union and the output should be

empno |ename
------------
1 aa
2 jjj
3 hhh
4 jjjj

Thanks in advance,
Anitha

Re: with out union [message #204819 is a reply to message #204814] Wed, 22 November 2006 04:27 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
Hi ,

Just u check it,

SELECT a.empno,b.name FROM emp a RIGHT OUTER JOIN emp1 b ON
(a.emp = b.emp1);

Or

SELECT a.empno,b.name FROM emp a FULL OUTER JOIN emp1 b
ON (a.emp = b.emp1);

Re: with out union [message #204821 is a reply to message #204819] Wed, 22 November 2006 04:31 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Why?

Why do we get so many requests from people saying 'I want to do X, without using the functionality best suited for X'

Is there a large population of technical masochists out there?
Re: with out union [message #204826 is a reply to message #204821] Wed, 22 November 2006 04:50 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
"It is an interview question" is often the reason given.
Instead of them asking "why can't I use X" during the interview they save their questions and ask them here.
And then what? Call back the interviewer saying "I just remembered the answer!" ?
Re: with out union [message #204863 is a reply to message #204826] Wed, 22 November 2006 07:33 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
Maybe they say the the interviewer they have to go to the bathroom, run to a PC and ask the question hoping someone will give them the answer within a minute or two.
Re: with out union [message #204878 is a reply to message #204863] Wed, 22 November 2006 08:11 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
AHA Hence the 'URGENT!!' additions!
Previous Topic: Table index taking huge amount of space
Next Topic: In trouble with the date format
Goto Forum:
  


Current Time: Sat Dec 10 06:53:17 CST 2016

Total time taken to generate the page: 0.09929 seconds