Re: UPDATE with Oracle ??? with join ???
Date: Wed, 19 Nov 2003 16:08:21 -0800
Message-ID: <1069286923.470979_at_yasure>
mcstock wrote:
> "Malcolm Dew-Jones" <yf110_at_vtn1.victoria.tc.ca> wrote in message
> news:3fbbe8b6_at_news.victoria.tc.ca...
> | Daniel Morgan (damorgan_at_x.washington.edu) wrote:
> |
> | : SQL> UPDATE (SELECT * FROM channels WHERE channel_desc = 'Catalog')
> | : 2 SET channel_desc = 'X';
> |
> | That's lovely! though I guess it's new in version 9.
> |
> | You check your criteria using the 100% safe select, and then run the
> | _identical_ statement in the "dangerous" step of modifying data.
> |
> | I plan to lookup
> |
> | DELETE FROM (SELECT...)
> |
> | to see if that works
> |
> | though direct answers as to whether that is also supported would be
> | available for all to read.
> |
>
> this works in v7 (at least in 7.3.4)
>
> -- mcs
I'm not surprised. Using the same syntax you can also insert into a select statement or delete from a select statement. It is a very under-appreciated syntax.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Thu Nov 20 2003 - 01:08:21 CET
