update的另一用法
摘要:定义:update set from想起用这个的原因是有两个表,A表和B表,其中两个表是通过uuid连接起来的,然后两个表都有customername这个字段,然后我一不小心把B表的customername全都改成一个人的名字了,所以我想尝试一下看看我能不能恢复用法:begin tranupdate b set b.customername=a.customername from CS_Customers a inner join CS_Projects_Task b on a.uuid=b.uuidcommit tranrollback tran在进行数据库的增删改操作时,一定要写在事务里面
阅读全文
posted @ 2012-10-24 16:27