Skip to main content
100%

Gist 0ca6276fe1534c7941d45e4bb229cc41

✓ Published0🌍 Public
HHugoberry
Last edited Apr 11, 2017
Created on Apr 10, 2017

This example demonstrates a SQL Server stored procedure that parses incoming JSON data and inserts it into a relational table. It shows how to use the `OPENJSON` function with an explicit schema definition to extract key-value pairs, mapping the JSON’s `Key` and `Value` fields into corresponding integer and varchar columns. The procedure accepts an `nvarchar(max)` parameter for the JSON payload, making it reusable for dynamic data ingestion. The visualization highlights the transformation from a semi-structured JSON format into a normalized table structure, emphasizing the schema-mapping capabilities of T-SQL’s JSON support.

AI-generated description

Similar vizzes