I have two tables.
One table is as follows: Table1:
id | title | view | date |
---|---|---|---|
117 | title1 | 10 | 21-12-10 |
120 | title2 | 21 | 21-12-09 |
125 | title3 | 40 | 21-12-08 |
127 | title4 | 50 | 21-12-07 |
... | ... | ... |
The other tables is as follows: Table2:
id | view |
---|---|
117 | 1158 |
120 | 3257 |
... | ... |
Table 1 and Table 2 are joined based on id,
and Table 1 is to be updated.
However, since the size of table 1 is very large, I would like to table 1 select based on the date column.
Finally, I want to join the following two tables and update them.
id | title | view | date |
---|---|---|---|
117 | title1 | 10 | 21-12-10 |
120 | title2 | 21 | 21-12-09 |
id | view |
---|---|
117 | 1158 |
120 | 3257 |
... | ... |
After the update table1:
id | title | view | date |
---|---|---|---|
117 | title1 | 1158 | 21-12-10 |
120 | title2 | 3257 | 21-12-09 |
125 | title3 | 40 | 21-12-08 |
127 | title4 | 50 | 21-12-07 |
... | ... | ... |
Is there a way?