我想添加变更集以yaml格式更新表列值,并在运行时通过选择查询获取更新后的值;
UPDATE table SET groupid=(select id from group where groupname='star') WHERE studentid=(select studentid from student where name ='abc');
yaml格式
- changeSet:
id: 1
author: abc
changes:
- update:
tableName: table
columns:
- column:
name: groupid
value: (select id from group where groupname='star')
where: studentid=(select studentid from student where name ='abc')
但这对我不起作用
答案 0 :(得分:0)
我得到了答案
- changeSet:
id: 1
author: abc
changes:
- update:
tableName: table
columns:
- column:
name: groupid
valueComputed: (select id from group where groupname='star')
where: studentid=(select studentid from student where name ='abc')