让我们说我想查找包含匹配的行。例如:在Postgres中返回否定匹配
select * from tableName where tableName.colName like '%abc%' limit 5;
这是要给我包含列colName
内子abc
表中的tableName
行。现在,如何获得列colName所在的行行数而不是包含字符串abc
。 Postgres中是否有某种否定运算符?
让我们说我想查找包含匹配的行。例如:在Postgres中返回否定匹配
select * from tableName where tableName.colName like '%abc%' limit 5;
这是要给我包含列colName
内子abc
表中的tableName
行。现在,如何获得列colName所在的行行数而不是包含字符串abc
。 Postgres中是否有某种否定运算符?
使用not like
:
select * from tableName where tableName.colName not like '%abc%' limit 5;
'选择表名*其中tableName.colName不喜欢 '%ABC%' 的限制5;'.. –
https://www.postgresql.org/docs/current /static/functions-logical.html –