Se connecter avec
S'enregistrer | Connectez-vous

virgule

Dernière réponse : dans Programmation
Lassé par la pub ? Créez un compte

http://dev.mysql.com/doc/mysql/en/Mathematical_function...
et
TRUNCATE(X,D)
Returns the number X, truncated to D decimals. If D is 0, the result will have no decimal point or fractional part. If D is negative, the integer part of the number is zeroed out.

mysql> SELECT TRUNCATE(1.223,1);
-> 1.2
mysql> SELECT TRUNCATE(1.999,1);
-> 1.9
mysql> SELECT TRUNCATE(1.999,0);
-> 1
mysql> SELECT TRUNCATE(-1.999,1);
-> -1.9
mysql> SELECT TRUNCATE(122,-2);
-> 100
Lassé par la pub ? Créez un compte