1. 程式人生 > >mysql 空值和null的判斷

mysql 空值和null的判斷


一:判斷空值

SELECT * FROM `users` where  pwd='';
結果:


SELECT * FROM `users` where  pwd !='';
結果:


二:判斷null值

SELECT * FROM `users` where  pwd is NOT NULL;

結果:


SELECT * FROM `users` where  pwd is NULL;

結果: