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: [EMAIL PROTECTED]
--------------------------------------

Reply via email to