INET6
This page is part of MariaDB's Documentation.
The parent of this page is: Data Types for MariaDB Enterprise Server
Topics on this page:
Overview
EXAMPLES
CREATE TABLE inet6_example (
description VARCHAR(20),
example INET6
);
INSERT INTO inet6_example VALUES
('Normal', '2001:db8::ac43:20e5'),
('Long', '2001:0db8:0000:0000:0000:0000:ac43:20e5'),
('Hex', 0x20010db80000000000000000ac4320e5),
('IPv4 mapped', '::ffff:192.0.2.42'),
('IPv4 compatible', '::192.0.2.42');
SELECT * FROM inet6_example;
+-----------------+---------------------+
| description | example |
+-----------------+---------------------+
| Normal | 2001:db8::ac43:20e5 |
| Long | 2001:db8::ac43:20e5 |
| Hex | 2001:db8::ac43:20e5 |
| IPv4 mapped | ::ffff:192.0.2.42 |
| IPv4 compatible | ::192.0.2.42 |
+-----------------+---------------------+