【发布时间】:2021-02-09 15:45:54
【问题描述】:
我尝试更新表中的行并在之后获得结果。 如果我这样做了
dsl.update(TABLE)
.set(TABLE.ROW, newRow)
.where(TABLE.ROW_2.eq(
dsl.select(ANOTHER_TABLE.ID)
.from(ANOTHER_TABLE)
.where(ANOTHER_TABLE.GUID.eq(guid))
)).execute()
它返回 1。但如果我这样做了
dsl.update(TABLE)
.set(TABLE.ROW, newRow)
.where(TABLE.ROW_2.eq(
dsl.select(ANOTHER_TABLE.ID)
.from(ANOTHER_TABLE)
.where(ANOTHER_TABLE.GUID.eq(guid))
)).returningResult(TABLE.ROW_3).fetchOne()
它返回空结果。但我想在更新后获得 TABLE.ROW_3 。有什么问题?
【问题讨论】:
-
您使用的是什么数据库产品?
-
我使用 vertica 9 db