判斷時間戳記為空 PostgreSQL: Select where timestamp is empty
使用 IS NULL 或 IS NOT NULL
--
null in SQL means 'unknown'.
This means that the result of using any comparison operator, like =, with a null is also 'unknown'.
To check if a column is NULL (or not NULL), use the special syntax of IS NULL (or IS NOT NULL) instead of using =.
Applying that to your statement,
SELECT * FROM table WHERE timestamp IS NULL;
should work.
--
轉自 https://stackoverflow.com/questions/4476172/postgresql-select-where-timestamp-is-empty
文章標籤
全站熱搜
