Re: Hmmm...Perplexed by SQL statements...
Date: Fri, 3 Mar 1995 23:42:14 GMT
Message-ID: <Pine.A32.3.91.950303184057.64035f-100000_at_IEDV7.acd.com>
On 22 Feb 1995, Mark Bluemel wrote:
> In <1995Feb17.073354.631_at_cho006> little_c_at_cho006.cho.ge.com (Chris Little) writes:
>
> >Two SQL questions:
> >------------------
> >Here's another one:
> >update table a set col='UPDATED' where id in (select id from b);
> >If table "b" is empty, every row in table "a" is updated. I was expecting
> >no row in "a" to be updated if table "b" was empty.
>
> I can't help you there - that seems wrong...
I don't know who or what is wrong, but
- the statement above is wrong syntax
- :
SQL> select * from a;
ID COL
--- ----------
A xxx
B xxx
C xxx
SQL> select * from b;
no rows selected
SQL> update a set col='UPDATED' where id in (select id from b);
0 rows updated.
SQL> So????? Received on Sat Mar 04 1995 - 00:42:14 CET