mysql-从表中删除空值行 [英] mysql - Removing null value rows from table
本文介绍了mysql-从表中删除空值行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个表格用户" ,其中有60多个列.列的名称之一是用户名"
我要删除用户名字段为空或 NULL
的行我该怎么做?
谢谢!
解决方案
尝试一下
DELETE FROM user WHERE username IS NULL;
或
DELETE FROM user WHERE username = '';
空值问题 >
I have a table "user" with over 60 columns. One of the column's name is "username"
I want to remove the rows where the username field is empty or NULL
How can I do this?
Thank you!
解决方案
Try this
DELETE FROM user WHERE username IS NULL;
or
DELETE FROM user WHERE username = '';
这篇关于mysql-从表中删除空值行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文