Postgres用加号更新值

时间:2019-01-30 23:03:02

标签: postgresql

任何人都可以解释为什么失败了吗?

testDB=# Update users set email = ‘Alex+check@test.com’ where id = 106;
ERROR:  syntax error at or near "check"
LINE 1: Update users set email = ‘Alex+check@test.com’ where id = 1...

1 个答案:

答案 0 :(得分:2)

这可能是一个长镜头,但请检查您的撇号。他们看起来错了。

如果您将其剪切/粘贴,这行得通吗?

Update users set email = 'Alex+check@test.com' where id = 106;

您的撇号:‘foo‘

我的撇号:'foo'

这很微妙,但我认为您拥有某种unicode字符,而不是简单的'