Tim Murphy's .NET Software Architecture Blog

INET_ATON

There are 1 entries for the tag INET_ATON

What Is INET_ATON And Why Is It In A Database

While converting some MySql databases to SQL Server I ran across this function. Confused by the lack of hints to its purpose in the name I did what any red-blooded IT person would do… look it up. It turns out that this function turns the string representation of an IP address into a long integer. What good that does I am still not sure, but here is the jist of the operation. (octet1 * 256^3) + (octet2 * 256^2) + (octet3 * 256) + octet4 Simple enough, right? Now for the real question. What the heck ......