Skip to main content

ipv4_num_to_string

Converts a 32-bit integer to an IPv4 address.

Syntax

ipv4_num_to_string( <int32> )

Arguments

ArgumentsDescription
<int32>An integer.

Return Type

String, a dotted-quad IP address, eg “1.2.3.4” or "255.255.255.255".

Examples

MySQL [(none)]> select ipv4_num_to_string(16909060);
+------------------------------+
| ipv4_num_to_string(16909060) |
+------------------------------+
| 1.2.3.4 |
+------------------------------+


MySQL [(none)]> select ipv4_num_to_string(1690906000000000000000000000);
+--------------------------------------------------+
| ipv4_num_to_string(1690906000000000000000000000) |
+--------------------------------------------------+
| 255.255.255.255 |
+--------------------------------------------------+