Sql Server Json Array To Rows | Parse and Transform JSON Data with OPENJSON

Sql Server Json Array To Rows Parse and Transform JSON Data with OPENJSON

 

DECLARE @json NVARCHAR(MAX)

SET @json='{"name":"A","surname":"B","age":40,"skills":["SQL","C#","Asp.Net"]}';

SELECT *
FROM OPENJSON(@json);

 

Note

 

Check compatibility level in the sys.databases view or in database properties.

Change the compatibility level of a database by using the following command:
ALTER DATABASE <DatabaseName> SET COMPATIBILITY_LEVEL = 130

2021-10-03