I have a table and I need to select all the rows with an empty value for the fk_fc_id
field (as a prelude to deleting them),
Column | Type | Modifiers
---------------+-----------------------------+------------------------------------------------------------
di_timestamp | timestamp without time zone |
di_item_value | character varying(10) |
fk_fc_id | integer |
di_id | integer | not null default nextval('data_item_di_id_seq1'::regclass)
However this doesn't work,
# select fk_fc_id,di_timestamp,di_item_value from data_item where fk_fc_id="";
ERROR: zero-length delimited identifier at or near """"
LINE 1: ...di_timestamp,di_item_value from data_item where fk_fc_id="";
^
Trying Null
doesn't work either.
If anyone has any suggestions on how to sort this, I would be very grateful.
null
using the=
operator will always returnnull
and cause that row to be excluded.