且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL用于更新来自不同表的记录

更新时间:2023-02-05 08:57:32

由于客户和订单表之间没有任何共同点且客户ID为空,因此无法设置 null 客户ID自动计算值。



你必须手动使用订单ID更新Order表中的行 -

更新订单设置customerId = ??订货号= 123456
Since there is nothing common between the customer and orders table and the customer id is blank, there is no way to set null customer ids to a value automatically.

You have to manually update rows in the Order table by using the order id -
Update Orders set customerId = ?? where Order Number = 123456