Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Like clause queries
Sam wrote:
> I have two queries
>
> select T1_Field1 from T1 where T1_Field2 like "deptname"
>
> select * from T2 where T2_Field2 like T1_Field1
>
> Is there anyway to combine these two queries to one?
No.
One query selects a single field. The other, I presume, multiple fields.
If the fields were the same in terms of datatype and number you could use UNION or UNION ALL
But with respect to your first query you can do: LIKE "deptname"
It is either
= 'deptname'
or it is
LIKE '%deptname%'
Daniel Morgan Received on Fri Jan 17 2003 - 12:48:11 CST