Skip to main content

INET_ATON

Converts an IPv4 address to a 32-bit integer.

Syntax

INET_ATON( '<ip>' )

Aliases

Return Type

Integer.

Examples

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')
├───────────────────────────────┼──────────────────────┤
1690906016909060
└──────────────────────────────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today