w如何通过一个mysql方法,而不是借助脚本判断?INET6_ATON(expr)

https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_inet-aton

https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_inet6-aton

Given an IPv6 or IPv4 network address as a string, returns a binary string that represents the numeric value of the address in network byte order (big endian). Because numeric-format IPv6 addresses require more bytes than the largest integer type, the representation returned by this function has the VARBINARY data type: VARBINARY(16) for IPv6 addresses and VARBINARY(4) for IPv4 addresses. If the argument is not a valid address, INET6_ATON() returns NULL.

The following examples use HEX() to display the INET6_ATON() result in printable form:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2021-04-24
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-21
  • 2021-11-02
  • 2021-11-18
  • 2022-01-01
  • 2021-11-02
  • 2021-11-02
  • 2022-01-21
相关资源
相似解决方案