Re: Total Values with MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SELECT SUM(ColumnName) AS total FROM table WHERE ColunName = '1';



On Mon, 2003-06-02 at 11:18, shaun wrote:
> Hi,
> 
> Is it possible to get MySQL to total the values of a select statement, say
> 'SELECT ColumnName FROM Table WHERE ColumnName = '1''
> 
> Say I have three values in ColumnName all of '1' then can I get MySQL to
> return 3?
> 
> Thanks for your help
-- 
Adam Voigt (adam@cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux