I have two tables: Table 1:
ID TICKET_AGENT ORIGINAL_ID
1 0 5
2 0 3
3 0 1
4 0 2
And, Table 2:
ID TICKET_AGENT
1 A
2 C
3 B
4 B
Is there any scenario where I can use UPDATE
to update Table 1.TICKET_AGENT
field by searching through ORIGINAL_ID
as the ID
of Table 2
and if ORIGINAL_ID
is found in table 2
, update table 1
after with the corresponding TICKET_AGENT
value?
UPDATE: ORIGINAL_ID points to ID in table 2
Table1
.Original_id
point toTable2
.id
? Or is it different?