Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 PostgreSQL 中有一个表,我需要检测一列是否包含特殊字符#,$,^,&,*,@,!等,或者是否为空。
#,$,^,&,*,@,!
例如表格可能是这样的
如何编写这样的查询?
最后我得到了解决方案
select * from table where column1 ~* '[^a-z0-9]' or column2 ~* '[^a-z0-9]' or column3 ~* '[^a-z0-9]'