Skip to content

Converts an IPv4 address to a 32-bit integer.

func.inet_aton(<ip>)
func.inet_aton('1.2.3.4')
┌───────────────────────────────┐
│ func.inet_aton('1.2.3.4') │
├───────────────────────────────┤
│ 16909060 │
└───────────────────────────────┘
INET_ATON(<ip>)

Integer.

SELECT IPV4_STRING_TO_NUM('1.2.3.4'), INET_ATON('1.2.3.4');
┌──────────────────────────────────────────────────────┐
│ ipv4_string_to_num('1.2.3.4') │ inet_aton('1.2.3.4') │
├───────────────────────────────┼──────────────────────┤
│ 16909060 │ 16909060 │
└──────────────────────────────────────────────────────┘