我一直在尝试使以下查询有效,但我做不到:
SELECT "users".* FROM "users" WHERE (users.roles LIKE "%sales%")
or
SELECT "users".* FROM "users" WHERE (users.roles LIKE '%sales%')
其中角色,可以包含:
{operations,business_development,sales,customer_service,manager}
角色是:character varying[]
我收到错误:
错误:运算符不存在:字符变化 [] ~~ 未知第 1 行:从 users.roles LIKE '%sales%'... 的用户中选择 users.id