“21天好习惯”第一期-1

如果zhaoyi的名字错了,要改成” caoyi”,该如何改呢?请写出正确的方案
update sales
set cust_name=null
update customer
set cust_name='caoyi'
where cust_name='zhaoyi'
update sales
set cust_name='caoyi'
where cust_name is null由于zhaoyi已经买了图书了,所以在订单表中已经引用了“zhaoyi”,
--所以必须先将订单表顾客置空,然后再修改顾客表,最后再将订单表中顾客栏为空的信息改为caoyi)

上一篇:Oracle


下一篇:MySQL命令大全