what data type to store a json array in mysql (5.6) database -


what data type should use store json encoded array in mysql version 5.6 json data type not available? far i'm thinking store text or varchar. how have store it?

it depends on length of json data going store. if it's not long can use varchar, have limit of 64k:

manual says: length can specified value 0 65,535. effective maximum length of varchar subject maximum row size (65,535 bytes, shared among columns) , character set used.

so if expect have huge objects, use text.

since mysql 5.7.8 you're able use native json data type, though.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -