VARBINARY
Variable-length binary string type. VARBINARY columns store binary strings of variable length up to a specified maximum.
Syntax
VARBINARY(M)Description
Oracle Mode
Examples
CREATE TABLE varbins (a VARBINARY(10));
INSERT INTO varbins VALUES('12345678901');
Query OK, 1 row affected, 1 warning (0.04 sec)
SELECT * FROM varbins;
+------------+
| a |
+------------+
| 1234567890 |
+------------+
SET sql_mode='STRICT_ALL_TABLES';
INSERT INTO varbins VALUES('12345678901');
ERROR 1406 (22001): Data too long for column 'a' at row 1VARBINARY
Data too Long
See Also
Last updated
Was this helpful?

