From: Chris W Date: August 21 2010 3:16pm Subject: Re: Performing subtraction between fields List-Archive: http://lists.mysql.com/mysql/222634 Message-Id: <4C6FEDD7.6020504@cox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit If you want C to always be A-B then it would, in my opinion, be a very bad idea to store C in the table. Instead you can just put C in your query. SELECT `A`, `B`, `A` - `B` AS `C` FROM `table` If that seems like a hassle, you could always create a view using that select. Chris W b@stripped wrote: > Hello, > > For simplicity's sake, let's say I have three fields, A, B and C, all > of which are integers. I'd like the value of C to be equal to A less B > (A-B). Is there a way I can perform this calculation? I'm guessing it > would happen when I INSERT a row and specify the values for A and B. > Feel free to direct me to the fine manual I should have read. > > Thank you. > > >