Hi,
How come "X=null" is not the same as "X is null"? I got a few selects with
queries like this:
select * from foo where customer=#custo mer# or (#customer# is null and customer
is null)
Without the last part, it will not correctly match null customers.
PS. I am using the ibatis framework for java, so the #customer# gets translated
to ? and the whole thing made into a prepared statement.
Thanks,
Baldur
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postg resql.org so that your
message can get through to the mailing list cleanly
How come "X=null" is not the same as "X is null"? I got a few selects with
queries like this:
select * from foo where customer=#custo mer# or (#customer# is null and customer
is null)
Without the last part, it will not correctly match null customers.
PS. I am using the ibatis framework for java, so the #customer# gets translated
to ? and the whole thing made into a prepared statement.
Thanks,
Baldur
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postg resql.org so that your
message can get through to the mailing list cleanly
Comment