Given the following table:
Table: Comedians ================= Id First Middle Last --- ------- -------- ------- 1 Bob NULL Sagat 2 Jerry Kal Seinfeld
I want to make the following prepared query:
SELECT * FROM Comedians WHERE Middle=?
work for all cases. It currently does not work for the case where I pass NULL via sqlite3_bind_null
. I realize that the query to actually search for NULL values uses IS NULL
, but that would mean that I cannot use the prepared query for all cases. I would actually have to change the query depending on the input, which largely defeats the purpose of the prepared query. How do I do this? Thanks!