删除空行 [英] Delete empty rows
本文介绍了删除空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 PostgreSQL 数据库,并且在一张表中我有日期时间列 edit_user.有些行是空白的,我想删除这些行.
I use PostgreSQL database and in one table I have the datetime column edit_user. Some rows are blank, and these rows I would like to delete.
我试过了
DELETE FROM table WHERE edit_user="";
但是我得到了错误
LINE 1: 从表中删除 edit_user="";
LINE 1: delete from table where edit_user="";
另外,我认为列中的空白值可能是 0000-00-00,但事实并非如此.
Also, I thought in the column as a blank value could be 0000-00-00, but there isn't.
我应该如何正确执行这个命令?
How I should execute this command correctly?
推荐答案
DELETE FROM table WHERE edit_user IS NULL;
这篇关于删除空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文