Skip to main content

try_inet_aton

try_inet_aton function is used to take the dotted-quad representation of an IPv4 address as a string and returns the numeric value of the given IP address in form of an integer.

Syntax

try_inet_aton(expression)

Arguments

ArgumentsDescription
expressionString.

Return Type

An integer.

Examples

mysql> SELECT TRY_INET_ATON('10.0.5.9');
+---------------------------+
| TRY_INET_ATON('10.0.5.9') |
+---------------------------+
| 167773449 |
+---------------------------+