我有这张桌子:
id | key | value
----+---------------------------+--------------------------------------
1 | insight.enabled | true
3 | customer_id | 2720f38b-c999-4f29-ba32-4da851c58d06
4 | eula_accepted | true
5 | insight.mandatory_confirm | true
6 | automation.enabled | true
7 | automation.enabled | false
8 | automation.enabled | false
当我执行以下命令时,我想删除Automation.enabled row:
delete from configuration where automation.enabled='false';
我收到以下错误消息:
ERROR: missing FROM-clause entry for table "automation"
LINE 1: delete from configuration where automation.enabled='false';
我如何转义'。作为列名的一部分?
答案 0 :(得分:0)
条件需要一列。 automation.enabled
是特定行中的值。因此,您需要的是这样:
DELETE from configuration where key = 'automation.enabled' AND value = 'false';