Updating the table
-
Wednesday, July 18, 2012 7:07 AM
Hi i am updating one table which is having 2 fk and one more field value while inserting i dont have any issues but while updating i dont want to update those 2fk values want to change only the other field value how can i do it (if i am changing all the values it is getting changed even update but i want those 2 values as same and want to change only one value in my table)
ex
table 1
id,
fk1,
fk2,
value
i just dont want to change the 2 fk values while i am updating how can i do some one there to help
harika
All Replies
-
Wednesday, July 18, 2012 10:47 AM
Simply write an update query only for affected columns,For example:
update table1 set col1=value,col2=value2 where (put your condition here)
cheers!!!
Vatsa
- Edited by vatsa_mitr Wednesday, July 18, 2012 10:53 AM spell mistake
- Proposed As Answer by vatsa_mitr Friday, July 20, 2012 6:37 AM
-
Monday, July 23, 2012 12:20 PM
its done thanksHi i am updating one table which is having 2 fk and one more field value while inserting i dont have any issues but while updating i dont want to update those 2fk values want to change only the other field value how can i do it (if i am changing all the values it is getting changed even update but i want those 2 values as same and want to change only one value in my table)
ex
table 1
id,
fk1,
fk2,
value
i just dont want to change the 2 fk values while i am updating how can i do some one there to help
harika
harika
- Marked As Answer by harika26 Monday, July 23, 2012 12:20 PM

