get_recordset_select ... NULL = -1 ?

Re: get_recordset_select ... NULL = -1 ?

ໂດຍ Tim Hunt -
ຈຳນວນການຕອບກັບ: 0
ຮູບພາບຂອງ Core developers ຮູບພາບຂອງ Documentation writers ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Peer reviewers ຮູບພາບຂອງ Plugin developers

http://sqlfiddle.com/#!9/9eecb/36398/0

NULL <> -1 

evaluates to NULL, which is not true. This is in line with the SQL standard. NULL is not a value. A reasonably interpretation to help develop you intuition is that NULL means 'unknown value'. "Is an unknown different from -1?", well that is also unknown.

To get the logic you want, you would need to say (status <> -1 OR status IS NULL)

ການຈັດອັນດັບສະເລ່ຍ:Useful (1)