List:General Discussion« Previous MessageNext Message »
From:James Harvard Date:December 18 2005 11:43pm
Subject:Re: How to Square a number?
View as plain text  
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

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?
Thread
How to Square a number?mos19 Dec
  • Re: How to Square a number?James Harvard19 Dec
    • Re: How to Square a number?mos19 Dec
      • Re: How to Square a number?Peter Brawley19 Dec
        • Re: How to Square a number?mos19 Dec
          • Re: How to Square a number?Elmar von Muralt19 Dec
            • Re: How to Square a number?mos19 Dec
  • Re: How to Square a number?SGreen19 Dec
  • Re: How to Square a number?Hugh Sasse19 Dec
RE: How to Square a number?SST - Adelaide)19 Dec
  • RE: How to Square a number?mos20 Dec
RE: How to Square a number?SST - Adelaide)20 Dec