You need to use "IS NULL" as opposed to "= NULL".
- Vlad
On Thu, 28 Oct 2004 00:55:39 +0200, Tito Ciuro <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'd like to remove all rows with a specific column equaling NULL. I've
> tried this:
>
> SQLite version 3.0.8
> Enter ".help" for instructions
> sqlite> select * from address;
> Ciur�|1|Javi||Espa�a
> Garaicoechevarria|2|Ana||Espa�a
> Ciur�|3|Tito||Espa�a
> Miti|4|Sam||Italy
> Schmuck|5|Joe||Germany
> sqlite> delete from address where ZIP = NULL;
>
> sqlite> select * from address;
> Ciur�|1|Javi||Espa�a
> Garaicoechevarria|2|Ana||Espa�a
> Ciur�|3|Tito||Espa�a
> Miti|4|Sam||Italy
> Schmuck|5|Joe||Germany
>
> sqlite> delete from address where ZIP = 'NULL';
> sqlite> select * from address;
> Ciur�|1|Javi||Espa�a
> Garaicoechevarria|2|Ana||Espa�a
> Ciur�|3|Tito||Espa�a
> Miti|4|Sam||Italy
> Schmuck|5|Joe||Germany
>
> Since all rows have NULL for ZIP, I would expect to remove all rows,
> but I cannot figure it out...
>
> Any ideas?
>
> Thanks,
>
> -- Tito
>