I have a simple One-to-One relationship between table TICKETINFO and TICKETINFO_REMARK.
TICKETINFO
TICKETINFOID pk, REMARK varchar(128), TICKETDATE timestamp
and
TICKETINFO_REMARK
TICKETINFOID fk, REMARK varchar(128)
and TICKETINFOID will be foreign key from TICKETINFO table and have to populate the REMARK field of TICKETINFO_REMARK along with the REMARK field of TICKETINFO for the corresponding TICKETINFOID.
For 1 TICKETINFOID there will be one REMARK.
The insertion is working fine.
Now my problem is:
My requirement is that I am not supposed to update any record in TICKETINFO_REMARK due to some performance issue. I need to delete the record first and insert it with the same TICKETINFOID and the new REMARK.
for example:
TICKETINFO table has:
**TICKETINFOID** : 1
**REMARK** : ABC
**TICKETDATE** :2012-06-12
TICKETINFO_REMARK has:
**TICKETINFOID** : 1
**REMARK** : ABC
Now I want to change the REMARK in TICKETINFO_REMARK to "XYZ123" So i have to delete the entry from TICKETINFO_REMARK and reinsert it which which look like this
**TICKETINFOID** : 1
**REMARK** : XYZ123
what will be the code to do it? please help!!!!