CUT_IPV6
Descriptionβ
Accept an IPv6 type address and return a string containing the address of the specified number of bytes removed in text format.
Syntaxβ
CUT_IPV6(<ipv6>, <cut_ipv6_bytes>, <cut_ipv4_bytes>)
Parametersβ
Parameter | Description |
---|---|
<ipv6> | An IPv6 type address |
<cut_ipv6_bytes> | The bytes you want to cut the ipv6 |
<cut_ipv4_bytes> | If the fist parameter is ipv4, The bytes you want to cut the ipv4 |
Return Valueβ
Return a value of text, which cut the ipv6 by specified bytes.
Exampleβ
select cut_ipv6(to_ipv6('2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D'), 10, 0);
+---------------------------------------------------------------------+
| cut_ipv6(to_ipv6('2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D'), 10, 0) |
+---------------------------------------------------------------------+
| 2001:db8:ac10:: |
+---------------------------------------------------------------------+