MongoDB
 SQL >> Database >  >> NoSQL >> MongoDB

Differenze tra NumberLong e Integer in MongoDB

NumberInt

Di default, la shell MongoDB considera tutti i numeri come valori floating-point. Il costruttore NumberInt() permette di specificare esplicitamente interi a 32 bit.

NumberLong

La shell MongoDB fornisce NumberLong() per gestire interi a 64 bit. Il costruttore accetta il valore long come stringa:

NumberLong("2090845886852")