Skip to main content

TO_IPV6

TO_IPV6​

TO_IPV6

Description​

Syntax​

IPV6 TO_IPV6(STRING ipv6_str)

Convert a string form of IPv6 address to IPv6 type. If the IPv6 address has an invalid format, throw an exception. Similar to ipv6_string_to_num function, which converts IPv6 address to binary format.

Notice​

Input cannot be NULL. If it is NULL, an exception will be thrown.

Example​

mysql> select to_ipv6('::');
+---------------+
| to_ipv6('::') |
+---------------+
| :: |
+---------------+

Keywords​

TO_IPV6, IP