On 10/2/15, Bart Smissaert <bart.smissaert at gmail.com> wrote:
>
> Unless I am mistaken here this is done with a SQL like this:
>
> SELECT COUNT(*) AS UNIQUE_ROWS
> FROM (SELECT DISTINCT * FROM TABLE1)
>
> But if we take advantage of the fact that this table has a unique index on
> all the fields of the table
> we can simply do this SQL:
>
> SELECT COUNT(*) FROM TABLE1
>

No.  That is only valid if all columns are individually NOT NULL.

-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to