HI, My table has 2 fields Id,Marks. Marks can be 100/200.Now I want to update marks by 2 ways. 1) add 5 to both numerator and denominator i,e 105/205. 2) add 5 to numerator i,e 105/200. What is the way to implement this? Regards
Probably by redesigning your database. There is no datatype for 'fraction'. Sounds like you are storing numeric values in a non-numeric field. Also, sounds like you are storing more than one piece of information in a single field--another problem. My suggestion would be to break out Marks into 2 fields of numeric datatypes, from there you can easily do an update query that simply adds 5 to both fields.