Hi. On Tue, Nov 06, 2001 at 12:34:26AM -0700, [EMAIL PROTECTED] wrote: > In MSSQL I can aggregate various fields like the [totalRev] field listed > below: > > Does anyone know if or how to do this in MySQL?
You can't. You only can do this in the SELECT clause or make a column that your application keeps current on INSERT/UPDATE. Bye, Benjamin. > > CREATE TABLE [dbo].[Financials] ( [...] > [revM11] [float] NULL , > [revM12] [float] NULL , > [totalRev] AS ([revM1] + [revM2] + [revM3] + [revM4] + [revM5] + [revM6] + > [revM7] + [revM8] + [revM9] + [revM10] + [revM11] + [revM12]) > ON [PRIMARY] [...] -- [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php