![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to be able to get all rows that have no values for column 'sp_fk_id' (or 'sp_char'). # select * from lixo where sp_fk_id = null; id | sp_fk_id | sp_char ----+----------+--------- (0 rows) |
#3
| |||
| |||
|
|
begin Luis P. Mendes <luis_lupe2 (AT) netvisao (DOT) pt> wrote: I want to be able to get all rows that have no values for column 'sp_fk_id' (or 'sp_char'). # select * from lixo where sp_fk_id = null; id | sp_fk_id | sp_char ----+----------+--------- (0 rows) You can't compare with NULL, NULL is nothing, and you can't compare something with nothing. But, you can use: select * from lixo where sp_fk_id is null; end Andreas Thank you Andreas. |
![]() |
| Thread Tools | |
| Display Modes | |
| |