compare two columns (oracle 9i)
- From: Bob Robert <mssql_2002@xxxxxxxxx>
- To: oracle-l@xxxxxxxxxxxxx
- Date: Thu, 13 Apr 2006 13:32:09 -0700 (PDT)
Gurus,
I would like to compare two columns from two different tables without
creating cursor. Is it possible?
create table r1 (col1 varchar2(10));
create table r2 (col2 varchar2(15));
insert into r1 values ('TEVE');
insert into r2 values ('STEVE');
insert into r1 values ('OM');
insert into r2 values ('TOM');
insert into r1 values ('JIM');
insert into r2 values ('BUSH');
SQL> select col1 from r1;
COL1
----------
TEVE
OM
JIM
SQL> select col2 from r2;
COL2
---------------
STEVE
TOM
BUSH
SQL> select col2 from r1,r2 where col2 like '%col1%';
no rows selected
Above Query doesn't return any rows?
Thanks
Bob
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
http://www.freelists.org/webpage/oracle-l
- Follow-Ups:
- SV: compare two columns (oracle 9i)
- From: Michael Garfield Sørensen, CeDeT
- Re: compare two columns (oracle 9i)
- From: LiShan Cheng
Other related posts:
- » compare two columns (oracle 9i)
- » Re: compare two columns (oracle 9i)
- SV: compare two columns (oracle 9i)
- From: Michael Garfield Sørensen, CeDeT
- Re: compare two columns (oracle 9i)
- From: LiShan Cheng