You can only cast the IP data type to IPV4 if the IPV6 value has an IPV4 semantic equivalent. The database can convert these IPV6 address formats to IPV4:
IPV4-compatible IPV6 ::x.x.x.x
IPV6-mapped IPV4 ::ffff:x.x.x.x
NAT64-prefixed 64:ff9b::x.x.x.x
Syntax
SQL
1IPV4(ip_col)
Argument
Data Type
Description
ip_col
IP
Returns the IPV4 portion of the IPV6 address. If the IPV6 address is not IPV4-compatible, IPV6-mapped, or NAT64, the cast returns an INVALID DATA TYPE CONVERSION error.
The IS_IPV4 Boolean function tests whether the database can convert the IP value to the IPV4 data type. The database can convert these IPV6 address formats to IPV4:
IPV4-compatible IPV6 ::x.x.x.x
IPV6-mapped IPV4 ::ffff:x.x.x.x
NAT64-prefixed 64:ff9b::x.x.x.x
Syntax
SQL
1IS_IPV4(ip_col)
Argument
Data Type
Description
ip_col
IP
Denotes whether the database can convert the specified IP value to the IPV4 data type with return values true or false.
The SUBNET function computes the prefix from an IP or IPV4 value and the size of the prefix. The function returns a value of the same type as ip_col.
Syntax
SQL
1SUBNET(ip_col, prefix_size)
Argument
Data Type
Description
ip_col
IP, IPV4
The IP address from which to calculate the prefix.
prefix_size
Integral
The size of the subnet network prefix. For IPV4 addresses, the size must be in [0, 32], and for IP addresses, the size must be in [0, 128]. If the prefix exceeds these range values, the function returns an INVALID ARGUMENT error.
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key