Common Mistakes in SQL Server – Part 4
Last week we have discussed how Null Values can cause a trouble in Common Mistakes in SQL Server – Part 3. This week I would like to draw your...
2023-10-23 (first published: 2023-10-09)
928 reads
Last week we have discussed how Null Values can cause a trouble in Common Mistakes in SQL Server – Part 3. This week I would like to draw your...
2023-10-23 (first published: 2023-10-09)
928 reads
In SQL Server, there are various scenarios in which you may want to consider recompiling a query or a stored procedure to ensure optimal query performance. Recompilation generates a...
2023-10-23
22 reads
Last week we discussed advantages of recompilation in Common Mistakes in SQL Server – Part 2. This week in this article Common Mistakes in SQL Server - Part 3 I...
2023-10-18 (first published: 2023-10-02)
966 reads
Last week, in the post Common Mistakes in SQL Server - Part 4 I explained about the Auto Growth configuration in SQL Server and how it can adversely impact....
2023-10-16
15 reads
Last week we have discussed how Null Values can cause a trouble in Common Mistakes in SQL Server – Part 3. This week I would like to draw your...
2023-10-09
15 reads
Last week we discussed advantages of recompilation in Common Mistakes in SQL Server – Part 2. This week in this article Common Mistakes in SQL Server - Part 3 I...
2023-10-02
41 reads
Security! This is the word that comes to mind of every concerned person when it comes to storing, accessing, and sharing the data and database or database server. At times when applications are run in geographically restricted areas, there...
2023-09-27 (first published: 2023-09-04)
403 reads
The Identity property creates an incremental value for the specified column automatically, which is why it is widely used by developers when they designed the table and a primary...
2023-09-25
72 reads
The Identity property creates an incremental value for the specified column automatically, which is why it is widely used by developers when they designed the table and a primary...
2023-09-25
13 reads
In this series of articles I will be sharing the common mistakes in SQL Server. I am certain that this is going to be very interesting read, here is...
2023-09-18
491 reads
By Steve Jones
Finding duplicates was an interview question for me years ago, and I’ve never forgotten...
By HeyMo0sh
Over time, I’ve realised that one of the hardest parts of cloud management isn’t...
By HeyMo0sh
One of the biggest challenges I’ve faced in cloud operations is maintaining clear visibility...
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
Comments posted to this topic are about the item Answering Questions On Dropped Columns
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