Home » SQL & PL/SQL » SQL & PL/SQL » query (oracle 10g)
query [message #394973] Mon, 30 March 2009 23:23 Go to next message
gaikwadrachit
Messages: 33
Registered: June 2007
Location: mumbai
Member
Hi

i have a table emp

emp_no sal grade
1 1000 A
2 2000 B
3 1000 A

I want to select from emp
select * from emp
where emp_no = 1
and sal> 1000;


select * from emp
where emp_no = 2
and sal> 2000;

I want to merge this query without union clause
can anyone help me please??????
Re: query [message #394974 is a reply to message #394973] Mon, 30 March 2009 23:25 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you & please be consistent & correct in your postings.

Post DDL for tables.
Post DML for test data.

Post expected/desired results.

>can anyone help me please??????
use OR
Re: query [message #394977 is a reply to message #394974] Mon, 30 March 2009 23:28 Go to previous messageGo to next message
gaikwadrachit
Messages: 33
Registered: June 2007
Location: mumbai
Member
can you give me the query
Re: query [message #394979 is a reply to message #394973] Mon, 30 March 2009 23:30 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
If you had actually read the Posting Guidelines, you would know that we do not do homework assignments.

Get creative!
Re: query [message #394983 is a reply to message #394979] Mon, 30 March 2009 23:37 Go to previous messageGo to next message
gaikwadrachit
Messages: 33
Registered: June 2007
Location: mumbai
Member
please give the query
Re: query [message #394984 is a reply to message #394973] Mon, 30 March 2009 23:41 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>please give the query
Why do you need the query & why do you not produce what you need?
Previous Topic: Operations within rows returned by query
Next Topic: query for database
Goto Forum:
  


Current Time: Sun Dec 11 08:30:35 CST 2016

Total time taken to generate the page: 0.04437 seconds