为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:8
【操作系统】:win8
【CPU】:四核
【问题描述】*:达梦支持多表关联更新吗
mysql语法如下:
update billitem_base item1 inner join billitem_base item2 on item1.tenant_id = item2.tenant_id
set item1.iOrder = item2.iOrder,item2.iOrder = item1.iOrder
where item1.iBillId in (select id from bill_base where cbillno = ‘fdtr_allocate_strategy’)
and item1.iTplId in (select tpl.id from billtemplate_base tpl inner join bill_base base on tpl.iBillId = base.id where base.cbillno = ‘fdtr_allocate_strategy’ and tpl.iTplMode = 0)
and item1.cName = ‘paymentAccountType’
and item2.iBillId in (select id from bill_base where cbillno = ‘fdtr_allocate_strategy’)
and item2.iTplId in (select tpl.id from billtemplate_base tpl inner join bill_base base on tpl.iBillId = base.id where base.cbillno = ‘fdtr_allocate_strategy’ and tpl.iTplMode = 0)
and item2.cName = ‘payment_currency_name’
and item1.iOrder < item2.iOrder;
怎样才能迁移到达梦库?
你的语句,你们同事已经找我改写。
https://blog.csdn.net/ai20110304/article/details/127416575
https://blog.csdn.net/ai20110304/article/details/123592283
可以看看这篇博客