Skip to content

microsoft/microsoft-sql

v1.0.0

Build and operate Azure SQL Database applications, from provisioning and secure connections through schema design, deployment, data movement, performance tuning, vector search, RAG, and local development with the Azure SQL Database container.

t-sql-json-and-openjson

Queries and stores JSON on Azure SQL Database using the native json type, a JSON index, and OPENJSON with an explicit WITH schema, instead of the older nvarchar(max) plus JSON_VALUE pattern the training data is full of. Use when asked to "store JSON in SQL", "query a JSON column", "shred a JSON array into rows", "flatten this payload into a table", "index a JSON property", "should this be nvarchar(max) or the json type", "parse the API response we saved", or when JSON_VALUE, JSON_QUERY, JSON_MODIFY, ISJSON, OPENJSON, JSON_OBJECT or JSON_ARRAYAGG appears in a query being written or reviewed; and when a JSON lookup returns NULL for a value that is visibly present, or invalid JSON reached a column that nothing rejected. Where a document column belongs in a table design is design-azure-sql-schema, and general T-SQL dialect is t-sql-correctness.

Read SKILL.md at the source

Pinned to revision eeb1c6867c2d, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.