gpt4 book ai didi

sql - OrientDB:如何使用选择查询更新列

转载 作者:行者123 更新时间:2023-12-04 19:20:29 26 4
gpt4 key购买 nike

我需要使用以下内容更新表中的列:

update Table1 set name = (select productName from Table2 where
@rid=$parent.$current.productid)

查询工作正常,但不是名称查询以“[productname]”格式存储值。

我已经阅读了 orientdb 文档,我猜选择查询以集合格式返回结果。所以我已经尝试过以下功能
  • 获取(1)
  • 第一个()
  • [0] 等(我绝望的尝试:)

  • 提前致谢。

    最佳答案

    我尝试搜索但没有得到任何清理,但是我进行了以下更改并完成了工作:)

    update Table1 set name=(select productname from Table2 where
    @rid=$parent.$current.productid),
    name= name.replace("\[","").replace("\]","")
    希望这可以为某人节省时间。

    关于sql - OrientDB:如何使用选择查询更新列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30690967/

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