INET_ATON(expression)

Description: Returns an integer representing the dotted decimal network address given by expression. May be a 4- or 8-byte address.

Example:

  • INET_ATON("213.234.21.67") returns 3588887875.

The example is calculated as 213*2553+234*2552+21*255+67.

See also: INET_NTOA()

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.