IP Calculator

ipcalcfunctionLast updated
Was this helpful?

ipcalcfunctionLast updated
Was this helpful?
Was this helpful?
D CREATE OR REPLACE TABLE ips AS SELECT '127.0.0.1' AS ip UNION ALL SELECT '192.168.1.0/22';
D SELECT i.IP,
(
SELECT hostsPerNet
FROM ipcalc(i.IP)
) AS hosts
FROM ips AS i;
ββββββββββββββββββ¬ββββββββ
β ip β hosts β
β varchar β int64 β
ββββββββββββββββββΌββββββββ€
β 127.0.0.1 β 254 β
β 192.168.1.0/22 β 1022 β
ββββββββββββββββββ΄ββββββββ