Skip to content
Advertisement

Add a column which stores JSON data

I have created table like:

But I’m not getting how to insert data into adress column which stores data of JSON object like:

Like this: The values I get in this adress column is dynamic count so that’s why I need to store it in JSON format.

Advertisement

Answer

Don’t overthink it. JSON is still a string, so nvarchar will be fine, but add a length to they datatype (probably nvarchar(max) for a JSON object).

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement