VeloDB Cloud
SQL Manual
SQL Functions
IP Functions
CUT_IPV6

CUT_IPV6

CUT_IPV6

Description

Syntax

STRING CUT_IPV6(IPV4 ipv4, TinyInt cut_ipv6_bytes, TinyInt cut_ipv4_bytes)

accept an IPv6 type address and return a string containing the address of the specified number of bytes removed in text format

Example

mysql [(none)]>select cut_ipv6(to_ipv6('2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D'), 10, 0);
+-------------------+
| '2001:db8:ac10::' |
+-------------------+
| 2001:db8:ac10::   |
+-------------------+
1 row in set (0.00 sec)

Keywords

CUT_IPV6, IP