Table 1
| Id | place | expiry_date |
|---|---|---|
| 10 | xyz | 2022-09-12 |
Table 2 - expiry_date is the new column created in table 2. Need to fetch expiry date from table 1 where T1_id (in table 2) matches id (in table 1)
| Oid | userid | expiry_date | T1_id |
|---|---|---|---|
| 2 | 123 | 10 |
How to fetch expiry date (table 1 and fill the new column in table 2) only if the T1_id and Id(table 1) matches
Trying
insert into (sql) statements
Joins used
Join table1.Id on table2.T1_id