IS_IPV6() function in MySQL Last Updated : 14 Dec, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report IS_IPV6() : This function in MySQL is used to check whether a specified string is a valid IPv6 address. If it is a valid IPv6 address then it will return 1. Otherwise, it will return 0. Syntax : IS_IPV6(expr) Parameter : This method accepts only one parameter. expr -Input string which we want to check. Returns : It returns 1 if the string is a valid IPv6 address. If the string is not a valid IPv6 address then it will return 0. Example-1 : Checking whether the given address is valid or not using IS_IPV6 Function. SELECT IS_IPV6('10.4.2.256') AS ValidOrNot; Output : VALIDORNOT0 So, we can see the given address is not a valid IPv6 address. Example-2 : Checking whether the given address is valid or not using IS_IPV6 Function. SELECT IS_IPV6('::2') AS ValidOrNot; Output : VALIDORNOT1 So, we can see the given address is a valid IPv6 address. Example-3 : Checking whether a IPv4 address is valid IPv6 address or not using IS_IPV6 Function. SELECT IS_IPV6('2001:0db8:85a3:0000:0000:8a2e:0370:7334') IPv6ValidOrNot, IS_IPV4('2001:0db8:85a3:0000:0000:8a2e:0370:7334') AS IPv4ValidOrNot; Output : IPV6VALIDORNOTIPV4VALIDORNOT10 Comment More infoAdvertise with us Next Article IS_IPV4_MAPPED() function in MySQL J jana_sayantan Follow Improve Article Tags : SQL DBMS-SQL mysql Similar Reads IS_IPV4() function in MySQL IS_IPV4() : This function in MySQL is used to check whether a specified string is a valid IPv4 address. If it is a valid IPv4 address then it will return 1. Otherwise, it will return 0. Syntax : IS_IPV4(expr) Parameter : This method accepts only one parameter. expr - Input string which we want to ch 1 min read IS_IPV4_MAPPED() function in MySQL IS_IPV4_MAPPED() : This function in MySQL takes an IPv6 address represented in numeric form as a binary string, as returned by INET6_ATON function. If the argument is a valid IPv4-mapped IPv6 address it returns 1, It returns 0 otherwise. The general form of IPv4-mapped addresses is ::ffff:ipv4_addre 2 min read LEAST() Function in MySQL The LEAST() function in MySQL is a versatile tool that returns the smallest (minimum) value from a list of expressions. It can be used with numbers, strings, or even columns of data to find the minimum value according to their data type.In this article, We will learn about LEAST() Function in MySQL 4 min read MySQL IF( ) Function The MySQL IF() function is a control flow function that returns different values based on the result of a condition. IF() Function in MySQLThe IF() function in MySQL returns a value if the condition is TRUE and another value if the condition is FALSE. The MySQL IF() function can return values that c 2 min read MySQL IF( ) Function The MySQL IF() function is a control flow function that returns different values based on the result of a condition. IF() Function in MySQLThe IF() function in MySQL returns a value if the condition is TRUE and another value if the condition is FALSE. The MySQL IF() function can return values that c 2 min read INET6_ATON() function in MySQL This function in MySQL takes a dotted representation of an IPv4 or IPv6 address and returns a binary string that represents the numeric value of the address in network byte order. If the input address is not a valid IPv4 or IPv6 address this function returns NULL. Syntax : INET6_ATON(expr) Parameter 2 min read Like