SQL Server – Filtering objects in Object Explorer – Management Studio
When you are working on a database with a large number of objects sometimes it becomes a challenge to locate...
2013-05-28
1,019 reads
When you are working on a database with a large number of objects sometimes it becomes a challenge to locate...
2013-05-28
1,019 reads
In earlier version of SQL Server Management Studio (2005, 2008 and 2008 R2) you can show/hide results pane using keyboard...
2013-05-20
1,831 reads
Starting with SQL Server 2005 all tables are grouped into schemas. While creating a table if the schema name is...
2013-05-13
1,816 reads
By default SQL Server listens on TCP port number 1433, and for named instances TCP port is dynamically configured. There...
2013-05-07 (first published: 2013-05-01)
4,801 reads
To identify default data and log directories in SQL Server 2012 you can use SERVERPROPERTY() function. In SQL Server 2012...
2013-05-06
899 reads
There are two different command you can use to check if you are running 32-bit or 64-bit version of SQL...
2013-04-22
1,096 reads
Both Clustered and Nonclustered Indexes have same physical structure in SQL Server. Both are stored as a B-Tree structure in...
2013-04-19
1,928 reads
You can export data from SQL Server using BCP command for SQLCMD utility. However, these utilities does not support dynamic...
2013-04-17 (first published: 2013-04-09)
3,583 reads
To import data from an Excel file to SQL Server you can use SQL Server Import and Export Wizard. You...
2013-04-15
28,991 reads
Last time I posted about How you can add date/time to output file name, in which I used xp_cmdshell to...
2013-04-12
2,349 reads
By Brian Kelley
I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...
EightKB is back again for 2026! The biggest online SQL Server internals conference is...
By HeyMo0sh
Working in DevOps long enough teaches you two universal truths: That’s exactly why I...
Hi all, I just started using VS Code to work with DB projects. I...
Comments posted to this topic are about the item Fun with JSON II
Comments posted to this topic are about the item Changing Data Types
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT t1.[key] AS row,
t2.*
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t1
CROSS APPLY OPENJSON(t1.value) t2; See possible answers