Skip site navigation (1) Skip section navigation (2)

Re: '= NULL' is not the same as 'IS NULL'

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: greg(dot)campbell(at)us(dot)michelin(dot)com
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: '= NULL' is not the same as 'IS NULL'
Date: 2006-09-06 23:30:41
Message-ID: 44FF5A21.7030408@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
greg(dot)campbell(at)us(dot)michelin(dot)com wrote:
> I have a question for the mailing list.
> More generally, let us assume that when in Access, you change a record
> focus (after a delete, insert, update. upon opening a form, or moving the
> Access cursor), it may be reasonable to execute one or more SELECT queries
> to refresh the form.
> Why does it tend to use the WHERE clause to match each field value, instead
> of a primary key for a match? What are the conditions that force primary
> key usages vs. "match every field" syntax?
>   

 From ancient times it's programmers' routine work to verify if the 
target record was changed
or not before updat/deleting the record. MS seems to prefer the way to 
verify and update/delete
at a time and executes an update/delete query with  WHERE clause to 
match each field value.
If the query update/deletes exactly one row it means that both the 
verification and the execution
are OK. If it update/deletes no row it probably meas that  someone 
changed the record somewhere.
IMHO it's a lot simpler than the way to get the record with lock and 
verify the change by the
program by itself and update/delete the record.

regarsds,
Hiroshi Inoue

In response to

pgsql-odbc by date

Next:From: Zubkovsky, SergeyDate: 2006-09-08 13:04:57
Subject: COPY ... FROM STDIN
Previous:From: greg.campbellDate: 2006-09-06 22:07:44
Subject: Re: '= NULL' is not the same as 'IS NULL'

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group