父级的orderNo属性修改后,需要同步更新多个子级的全部orderNo属性,子类的orderNo内容要和父级同步
sql
MERGE INTO rec_search_solution_field e1
USING (
SELECT field_id, order_no
FROM rec_search_solution_field
WHERE solution_id='2023062616531652c6e468-8a73-4934-9f7d-7c96102c249a'
AND order_no IS NOT NULL
) e2
ON (e1.field_id = e2.field_id)
WHEN MATCHED THEN
UPDATE SET e1.order_no = e2.order_no
WHERE e1.solution_id= '2023071916160381771c2e-d2f1-4289-a022-83d2a71ceddd';
本文作者:Weee
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!