Mysql, determines whether the field is null

problem description

I want to query whether a field is null. If it is null, the query result returns flase. If it is not null, the result returns true. What should I do? Because the field value is very long, and you don"t need to get the value of the field, you just need to know whether the field is null or not. What should I do?

Mar.28,2022

MySQL it is not good to return false and true , which can be replaced by 0 and 1

--  null result  0 1
select if(`` is null, 0, 1) as result from `table` where xxx;

encapsulate a function and return


where xx is null

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bd4c-2ba41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bd4c-2ba41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?