List:General Discussion« Previous MessageNext Message »
From:Joachim Klöfers Date:August 31 2005 9:54am
Subject:Re: DIV-function?
View as plain text  
Jasper Bryant-Greene schrieb:

> Gustav Wiberg wrote:
>
>> Hi there!
>>
>> I wonder how I'll get a div-function in SQL?
>
>
> I dunno, maybe by looking in the manual? From [1]:
>
> Division:
>
> mysql> SELECT 3/5;
>         -> 0.60
>
> [1] http://dev.mysql.com/doc/mysql/en/arithmetic-functions.html
>

Gustav is looking for the DIV-function.

But it is there

|DIV|

Integer division. Similar to |FLOOR()| but safe with |BIGINT| values.

mysql> *|SELECT 5 DIV 2;|*
        -> 2

|DIV| is new in MySQL 4.1.0.

Joachim

-- 
--------------------------------------
Data Request Services
Joachim Klöfers
Dekan-Schuster-Str. 17
D-63110 Rodgau
Tel.:(+49)(0)6106-21448
email: Joachim.Kloefers@stripped
--------------------------------------


Thread
DIV-function?Gustav Wiberg30 Aug
  • Re: DIV-function?Jasper Bryant-Greene30 Aug
    • Re: DIV-function?Joachim Klöfers31 Aug
    • Re: DIV-function?Joachim Klöfers31 Aug
      • Re: DIV-function?Jasper Bryant-Greene31 Aug
  • Re: DIV-function?Martijn Tonies31 Aug
    • Re: DIV-function?Nuno Pereira1 Sep