List: | General Discussion | « Previous MessageNext Message » | |

From: | SGreen | Date: | December 18 2005 11:48pm |

Subject: | Re: How to Square a number? | ||

View as plain text |

mos <mos99@stripped> wrote on 12/18/2005 06:36:16 PM: > 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? TIA > > Mike > If you took 7th grade math, you should know that squaring a number is shorthand for multiplying it by itself. I commend the MySQL designers for leaving out a function to do such a simple thing. IMHO if you use N*N, you will get as accurate results as if there were a SQR(N) function you could call. This is just too simple to need a function to evaluate. Shawn Green Database Administrator Unimin Corporation - Spruce Pine

Thread | ||
---|---|---|

• How to Square a number? | mos | 19 Dec |

• Re: How to Square a number? | James Harvard | 19 Dec |

• Re: How to Square a number? | mos | 19 Dec |

• Re: How to Square a number? | Peter Brawley | 19 Dec |

• Re: How to Square a number? | mos | 19 Dec |

• Re: How to Square a number? | Elmar von Muralt | 19 Dec |

• Re: How to Square a number? | mos | 19 Dec |

• Re: How to Square a number? | SGreen | 19 Dec |

• Re: How to Square a number? | Hugh Sasse | 19 Dec |

• RE: How to Square a number? | SST - Adelaide) | 19 Dec |

• RE: How to Square a number? | mos | 20 Dec |

• RE: How to Square a number? | SST - Adelaide) | 20 Dec |