Django: Using an F expression for a text field in an update call

后端 未结 5 959
小鲜肉
小鲜肉 2021-01-01 10:17

In a django view, I need to append string data to the end of an existing text column in my database. So, for example, say I have a table named \"ATable\", and it has a fiel

5条回答
  •  借酒劲吻你
    2021-01-01 10:58

    seems you can't do this. however, what you are trying to do could be solved using transactions

    (looks like you are using postgres, so if you want to do it in one query and use raw sql as suggested, || is the concatenation operator you want)

提交回复
热议问题