SQLite3 and lastrowid
alain at dpt-info.u-strasbg.fr
Fri Nov 19 13:23:40 CET 2010
Alexander Gattin <xrgtn at umc.com.ua> writes:
> On Fri, Nov 19, 2010 at 12:32:19PM +0100, Alain
> Ketterlin wrote:
>> Alexander Gattin <xrgtn at yandex.ru> writes:
>> > It's better to select count(1) instead of
>> > count(*). The latter may skip rows consisting
>> > entirely of NULLs IIRC.
>> Wrong: count(anyname) ignores NULL, whereas count(*) does not.
> I'm using count(1), which is a count over constant
> non-NULL expression (1). It doesn't ignore NULLs
> or duplicate rows, as my attempts with Oracle 10g,
> 8g and sqlite3 show.
I'm not saying anything about count(1) (which works like count(*) as you
explain, even though I see no point in using 1, since *'s hehavior is
What was wrong in your first message is that count(*) ignores NULL
(granted, you've corrected your mistake in a later message, which I
didn't see before posting).
More information about the Python-list