At 05:43 PM 12/18/2005, James Harvard wrote:
>Maybe I'm missing something, but can't you just multiply the number by itself?
>
>select (3 * 3);
>
>select (int_col * int_col) as squared from table_name;
>
>James H
James,
Yes, it's a bit more complicated than that. I'm using an
expression so I don't want to have to repeat the whole expression all over
again.
Mike
>At 5:36 pm -0600 18/12/05, mos wrote:
> >How do I square a number in MySQL 4.1? I thought it would be something
> simple like:
> >select 3**2
> >but that produces a syntax error. I can use Pow(3,2) but that produces a
> float. Is there a Square function?
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe: http://lists.mysql.com/mysql?unsub=1