I'm trying to port a MSSQL database over to MariaDB and I've encountered a table creation using varbinary(max):
`definition` VARBINARY(max) NULL DEFAULT NULL
What would this actually do and is there an equivalent type definition in MariaDB that I could use?
As others have stated in the comments, VARBINARY(max)
in MSSQL refers to:
Variable-length binary data.
max indicates that the maximum storage size is
2^31-1
bytes.
From what I found in MariaDB's documentation, the only way of getting a similar storage size in MariaDB is to use the LONGBLOB
data type:
LONGBLOB
A BLOB column with a maximum length of
4,294,967,295
bytes or4GB
(2^32 - 1
).
Useful links:
https://msdn.microsoft.com/en-us//library/ms188362.aspx
http://www.techonthenet.com/mariadb/datatypes.php
In SQL Server, VARBINARY is variable length binary data, the MAX scale value means it will store up to the maximum 2^31-1 bytes.
I think the closest equivalent MariaDB data type will be LONGBLOB, which can store up to 2^32-1 bytes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With