Hi,
When u concatenate C1 and C2 in the where condition
the index will not be used.
Instead, try it this way :
where (c1,c2) in (select c1,c2 from t2);
Regards
Rajagopal Venkataramany
- B N RAMAMOHAN <ramamohan.bn_at_tatainfotech.com>
wrote:
> Hi,
>
> I have a table T1 which has two columns C1 & C2
> which are
> composite PK. There is another table T2 which
> contains part
> of these PK's (but they are not PKs here). Now I
> have to
> delete the rows from T1 for which PK values are in
> T2.
>
> One query that comes to my mind is:
>
> delete T1
> where C1||C2 in (select C1||C2 from T2);
>
> Is there any other efficient way of doing this?
>
> Please help me...
>
>
> Regards,
> Mohan
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: B N RAMAMOHAN
> INET: ramamohan.bn_at_tatainfotech.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
Received on Mon Jan 15 2001 - 17:28:09 CST