Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
428 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Some other pages relevant to these blogs include:
You can also book hourly online consultancy for your time zone with one of our 7 expert trainers!
|
Using JSON in SQL Server, including the new SQL 2025 functions Part three of an eight-part series of blogs |
|---|
|
SQL Server 2025 introduces a new JSON data type and some new JSON functions - we thought we'd use this as an excuse to create this masterclass on working with JSON in SQL Server
|
The json data type makes it easy to store the contents of your JSON files in SQL Server:

The new JSON field in table data and table design view.
Here's some SQL (building on our previous example) which would create, populate and show this table:
-- create a variable to hold the JSON text
DECLARE @json_text NVARCHAR(MAX)
-- set this variable to be the contents of the file
SELECT @json_text = j.BulkColumn
FROM OPENROWSET(
BULK 'C:\wiseowl\person.json',
SINGLE_CLOB
) as j;
-- drop the table if it exists
DROP TABLE IF EXISTS tblPerson
-- store this as a table
CREATE TABLE tblPerson(
PersonId int primary key identity,
PersonJson JSON
);
-- add our JSON as the first row
INSERT INTO tblPerson(PersonJson)
VALUES (@json_text)
-- show this has worked
SELECT * FROM tblPerson
The key point of this SQL is that it designates the PersonJson column as having json data type:

This new data type was introduced in SQL Server 2025.
The JSON data type holds a string of text in binary format, making accessing and indexing the data much quicker and more efficient.
| Parts of this blog |
|---|
|
Some other pages relevant to these blogs include:
You can also book hourly online consultancy for your time zone with one of our 7 expert trainers!
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2025. All Rights Reserved.