Collections:
IS_IPV6() - Detecting IPv6 Address
How to detect an IPv4 Address using the IS_IPV6() function?
✍: FYIcenter.com
IS_IPV6(ip) is a MySQL built-in function that
returns 1 if the given value is a valid IPv6 address, 0 otherwise.
For example:
SELECT IS_IPV4('10.0.5.9'), IS_IPV4('10.0.5.256');
-- +---------------------+-----------------------+
-- | IS_IPV4('10.0.5.9') | IS_IPV4('10.0.5.256') |
-- +---------------------+-----------------------+
-- | 1 | 0 |
-- +---------------------+-----------------------+
Reference information of the IS_IPV6() function:
IS_IPV6(ip): boolean
Returns 1 if and only if the argument is a valid IPv6 address.
Arguments, return value and availability:
ip: Required. The IPv6 address to be examined.
boolean: Return value.
1 if and only if the argument is a valid IPv6 address.
Available since MySQL 4.0.
Related MySQL functions:
⇒ IS_USED_LOCK() - Checking Lock Owner
⇐ IS_IPV4_MAPPED() - IPv4-Mapped IPv6 Address
2026-01-24, 4344🔥, 0💬
Popular Posts:
How To Get Help Information from the Server in MySQL? While you are at the "mysql>" prompt, y...
What Are Out-of-Range Errors with DATETIME values in SQL Server Transact-SQL? When you enter DATETIM...
What Are the Underflow and Overflow Behaviors on FLOAT Literals in SQL Server Transact-SQL? If you e...
How AdventureWorksLT tables are related in SQL Server? There are 12 user tables defined in Adventure...
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...