When querying the MySQL database, when the field is empty, it returns A, and when it is not empty, it returns B
The solution is to deal with the if function and isnull function of mysql:
select id userId,if(ISNULL(cellphone),-1,0) from user
When querying the MySQL database, when the field is empty, it returns A, and when it is not empty, it returns B
The solution is to deal with the if function and isnull function of mysql:
select id userId,if(ISNULL(cellphone),-1,0) from user