gpt4 book ai didi

postgresql - Postgres - 来自 CLI 的更新命令

转载 作者:行者123 更新时间:2023-11-29 12:37:37 25 4
gpt4 key购买 nike

我需要在 Linux 中创建脚本。有这样的命令:

psql -U postgres -d ticketon -c "UPDATE "user" SET "password" = 'test'"

当我把它放在引号里时,有错误。不加引号时,也会报错。我几乎尝试了一切,但仍然没有成功。有谁知道什么是正确的语法?

最佳答案

a_horse_with_no_name 是怎么说的。

psql -U postgres -d dbName -c "UPDATE \"user\" SET \"password\" = 'test'"

关于postgresql - Postgres - 来自 CLI 的更新命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24656217/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com