【发布时间】:2014-06-16 11:40:48
【问题描述】:
我正在尝试构建更新查询 - 例如
update table A set Column 1 = ,Column 2= , Column 3..... where
Constant selection criteria
让我们说要更新的最大列数是 3,并且可以有任何组合,具体取决于某些业务规则,例如
Condition 1 - update only Column 1
Condition 2 - update Column 1 and Column 2 and so on. ( 6 combinations in this case)
在这种情况下,您将如何构建更新查询?
我没有使用休眠。
我只能想到粗略的方法来构建查询。
【问题讨论】:
-
进行更新时您是否可以使用原始行?
-
@heikkim 我会的
标签: java sql spring jdbc spring-jdbc