Home » Other » Training & Certification » SAME COLUMN VALUES COMPARISION (same column comparision)
SAME COLUMN VALUES COMPARISION [message #274513] Tue, 16 October 2007 04:48 Go to next message
Messages: 59
Registered: February 2005
Location: India
I have a table tab1
Col1 Col2
1 MIke
2 jude
3 sarah

i need to retrive a record if the id exists like if i pass id as (1,2) it should return two records. if i pass (1,10) it should not return any results but i tried with exists but it return one match record(1) when it encounts a match record.

i need to work like AND operation not like IN operations
select * from tabl where col1 = 1 and col2=3 //similar objective if i use IN operator it is working like
select * from tabl where col1 = 1 or col2=3

how to do by query or only by PLSQL?

Pandi G S
Re: SAME COLUMN VALUES COMPARISION [message #274515 is a reply to message #274513] Tue, 16 October 2007 04:55 Go to previous message
Michel Cadot
Messages: 64724
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

need to work like AND operation not like IN operations


Exercise: X IN (...,...) = NOT (X != ... AND X != ...)

Previous Topic: Interview tips for Trainee Oracle DBA
Next Topic: Please give me answers to these interview questions
Goto Forum:

Current Time: Wed Apr 26 03:24:06 CDT 2017

Total time taken to generate the page: 0.14178 seconds