Important
The SingleStore 9.1 release candidate (RC) is available now. It will be promoted to general availability (GA) soon and at that time it will be renamed to SingleStore 10.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10, while SingleStore 9.0 is recommended for production workloads.
INET_ ATON
On this page
The INET_ function converts an IPv4 address to a 32-bit integer.
Syntax
INET_ATON ( ip )
Arguments
-
ip: a dotted-quad IP address, eg
1.
2. 3. 4
Return Type
Integer, or NULL if the IP address cannot be parsed.
Note
This function does not handle IPv6 addresses.
Examples
SELECT INET_ATON('1.2.3.4');
+----------------------+
| INET_ATON('1.2.3.4') |
+----------------------+
| 16909060 |
+----------------------+SELECT INET_ATON('127.1');
+--------------------+
| INET_ATON('127.1') |
+--------------------+
| 2130706433 |
+--------------------+SELECT INET_ATON('127.0.0.1');
+------------------------+
| INET_ATON('127.0.0.1') |
+------------------------+
| 2130706433 |
+------------------------+SELECT INET_ATON('2a03:2880:10:1f02:face:b00c::25');
+----------------------------------------------+
| INET_ATON('2a03:2880:10:1f02:face:b00c::25') |
+----------------------------------------------+
| NULL |
+----------------------------------------------+Related Topics
Last modified: