Checking for an empty field with MySQL

前端 未结 7 482
有刺的猬
有刺的猬 2020-12-12 14:58

I\'ve wrote a query to check for users with certain criteria, one being they have an email address.

Our site will allow a user to have or not have an email address.<

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 15:29

    There's a difference between an empty string (email != "") and NULL. NULL is null and an Empty string is something.

提交回复
热议问题