xxxxx

MySQL 常用语句总结

用一个表更新另一个表

UPDATE table1 t1, table2 t2 SET t1.field1 = t2.field1, t1.field2 = t2.field2 WHERE t1.field3 = t2.field3;
UPDATE table1, table2 SET table1.field1 = table2.field1 WHERE table1.field2 = table2.field2;

 

posted @ 2018-09-27 15:25  St4ndAlone  阅读(123)  评论(0编辑  收藏  举报
i still love you