无法使用 ANY()、ALL()、SOME()

0

【以下的问题经过翻译处理】 有人见过类似的错误吗:

存在问题的函数:ANY。可能函数不存在,或依赖函数存在问题。

SELECT * FROM "mytable"."temperature" WHERE device_name <> ANY('Foo', 'Bar')

编辑者:dwery,于2020年11月22日上午9:50进行编辑。

profile picture
EXPERT
demandé il y a 8 mois41 vues
1 réponse
0

【以下的回答经过翻译处理】 如果比较值是一个字符串列表,例如SELECT * FROM "mytable"."temperature" WHERE device_name ANY (VALUES 'Foo', 'Bar'),则应使用关键字VALUES。ALL和SOME也是如此。另一种替代语法是

SELECT * FROM "mytable"."temperature" WHERE device_name ANY (SELECT 'Foo' UNION ALL SELECT 'Bar')。

profile picture
EXPERT
répondu il y a 8 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions