sqlite基于b表更新a表
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
UPDATE table_a SET table_a.column_a_1 = (SELECT table_b.column_b_1 FROM table_b WHERE table_b.user_name = table_a.user_name ) , table_a.column_a_2 = (SELECT table_b.column_b_2 FROM table_b WHERE table_b.user_name = table_a.user_name ) WHERE EXISTS ( SELECT * FROM table_b WHERE table_b.user_name = table_a.user_name ) |
近期评论