Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: QUERY
hi,Seema Singh
Any advice are welcome.
update main_test a
set a.directions =3D(select b.access1 from trail_main b
where b.trail_name =3D a.trail_name
and b.trail_code =3D a.trail_code)
This is updating 6595 rows.
you update all the rows in table main_test
if the main_test has some rows but the key values not in =
trail_main
then you will update the directions =3D NULL ;
>update main_test a
>set a.directions =3D (select access1 from trail_main b
> where a.trail_name =3D b.trail_name
> and a.trail_code =3D b.trail_code )
>where a.trail_id =3D ANY (select a.trail_id from
> vw_trail_main_test a, trail_main=
b
> where a.trail_name =3D b.trail_name and=
a.trail_code
>=3D b.trail_code )
this is correct . you can only update the rows in main_test= that the key values in trail_main
Best regards
yahoo id: feng_chunpei
A new dba from china
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>----------------------------------------------------------------=
>To unsubscribe send email to: oracle-l-request_at_freelists.org
>put 'unsubscribe' in the subject line.
>--
>Archives are at http://www.freelists.org/archives/oracle-l/
>FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>----------------------------------------------------------------=
-
>
>.
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Tue Apr 27 2004 - 21:27:33 CDT
![]() |
![]() |