I have 2 tables T1 and T2.
T1(provider_ssn,clinic,date,start_time,end_time,activity)
T2(provider_ssn,clinic,date,start_time,end_time,activity,sponsor_ssn,is_special_time,link)
What is happening now is, when I insert a row in T1, I insert a row in T2 with all the exact parameters
as T1 and the last 3 as sponsor_ssn = 000000000 and is_special_time = 1 and link = 1
Now, I want to add a new column to T1 called "ak" which is varchar(50) and a new column to T2 called
"webid" which is also varchar(50). Basically I want to have some sort of primary key foreign key relationship
from T1 --> T2.
Now, I have already added the "ak" column to T1 with some unique values. I want to add the same values
to
corresponding rows in T2 in column "webid".
What will be the best way to do this? I understand that there will be some sort of update query,but
I can't seem to figure that out.
Thanks for your help.
Comments
UPDATE T1, T2 SET T2.webid = T1.az
WHERE T1.provider_ssn=T2.provider_ssn;
thanks,
Nick