Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> SV: compare two columns (oracle 9i)
Me thinks you mean:
select col2 from r1,r2 where col2 like '%'||col1||'%';
HTH
Michael
-----Oprindelig meddelelse-----
Fra: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] På
vegne af Bob Robert
Sendt: 13. april 2006 22:32
Til: oracle-l_at_freelists.org
Emne: compare two columns (oracle 9i)
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
COL2
no rows selected
Above Query doesn't return any rows?
Thanks
Bob
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 13 2006 - 15:41:03 CDT