Information générale
Forum:
Microsoft SQL Server
The others gave you the number answer; to calculate this, you would solve for n in the below formula:
2**n = 2,147,483,647
LOG(2**n) = LOG(2,147,483,647) ; take the log value of both sides of the equation
n*LOG(2) = LOG(2,147,483,647) ; the power can be moved to be multiplied as shown
n = LOG(2,147,483,647) / LOG(2) ; now divide each side by LOG(2)
n = 30.999999999\
2**31 equals 2,147,483,648; so any number less than the power of 2**31 could be stored; or the maximum int power is 30.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement