And Oracle says the opposite:

Yet they all give the same answer when done with "update testtable set 
testrow=null where testrow not null;


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL> create table testtable(testrow number);
Table created.
SQL> insert into testtable values(NULL);
1 row created.
SQL> insert into testtable values(NULL);
1 row created.
SQL> insert into testtable values(NULL);
1 row created.
SQL> update testtable set testrow=null;
3 rows updated.
SQL> update testtable set testrow=null;
3 rows updated.
SQL> update testtable set testrow=null where testrow is not null;

0 rows updated.

So rather than holding your breath for Oracle to change I'd recommend you do it 
the portable way.


Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems

________________________________________
From: [email protected] [[email protected]] on 
behalf of Paul van Helden [[email protected]]
Sent: Tuesday, July 03, 2012 7:47 AM
To: [email protected]; General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Update trigger fires for all rows even if 
sqlite3_changes returns 0

On Tue, Jul 3, 2012 at 2:43 PM, Paul van Helden <[email protected]>wrote:

>
>>   The statement "UPDATE table SET column=NULL" updates every row in the
>>   table.  The fact that some rows may already have a NULL in that
>>   column is not important.
>>
>> Well, it is important to me, the word "change" means before != after :-)
>

Just checked MySQL:

UPDATE testtable SET testrow=NULL;
Affected rows: 40
UPDATE testtable SET testrow=NULL;
Affected rows: 0

That is what I'm familiar with.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to