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') │
├───────────────────────────────┼──────────────────────┤
│ 16909060 │ 16909060 │
└──────────────────────────────────────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today