MYSQL : type BIGINT

MYSQL : type BIGINT - SQL/NoSQL - Programmation

Marsh Posté le 17-02-2004 à 11:03:09    

Salut!
 
J'aimerais des informations sur le type BIGINT de MYSQL, sur la doc officiel il y'a beaucoup de commentaires dessus, mais je capte pas tout.
 

Code :
  1. BIGINT[(M)] [UNSIGNED] [ZEROFILL]
  2. A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615. Some things you should be aware of with respect to BIGINT columns:
  3. All arithmetic is done using signed BIGINT or DOUBLE values, so you shouldn't use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting the BIGINT to a DOUBLE. MySQL 4.0 can handle BIGINT in the following cases:
  4. Use integers to store big unsigned values in a BIGINT column.
  5. In MIN(big_int_column) and MAX(big_int_column).
  6. When using operators (+, -, *, etc.) where both operands are integers.
  7. You can always store an exact integer value in a BIGINT column by storing it as a string. In this case, MySQL will perform a string-to-number conversion that involves no intermediate double representation.
  8. `-', `+', and `*' will use BIGINT arithmetic when both arguments are integer values! This means that if you multiply two big integers (or results from functions that return integers) you may get unexpected results when the result is larger than 9223372036854775807.


 
J'aurais bien besoin d'un BIGINT, mais cela pose t'il de reel problemes ?
 
Merci d'avance.


---------------
AfterEnd: Batissez un nouveau monde
Reply

Marsh Posté le 17-02-2004 à 11:03:09   

Reply

Marsh Posté le 17-02-2004 à 11:46:49    

il dit que si tu utilises des bigint non-signés, il faut t'attendre à des problèmes au delà d'une certaine valeur si tu fais de l'arithmétique dessus.


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
Reply

Marsh Posté le 17-02-2004 à 12:06:25    

drasche a écrit :

il dit que si tu utilises des bigint non-signés, il faut t'attendre à des problèmes au delà d'une certaine valeur si tu fais de l'arithmétique dessus.


Merci:)
C'est l'unique probleme ?


Message édité par smilm le 17-02-2004 à 12:06:42

---------------
AfterEnd: Batissez un nouveau monde
Reply

Marsh Posté le 17-02-2004 à 12:53:09    

traduction française: http://www.nexen.net/docs/mysql/an [...] -types.php


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
Reply

Marsh Posté le 17-02-2004 à 15:19:15    

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed