选择PSQL之间的反转

时间:2015-09-11 01:55:31

标签: sql postgresql

我想在postgres数据库中选择数据范围的反转: 我想要使​​用的查询是

SELECT * 
FROM projects 
WHERE lastactivity BETWEEN 2015-08-3 AND 2015-09-11

1 个答案:

答案 0 :(得分:1)

NOT条件中使用BETWEEN运算符,如

SELECT * 
FROM projects 
WHERE lastactivity NOT BETWEEN 2015-08-3 AND 2015-09-11;