Answering Questions On Dropped Columns
Answering a couple of questions from the previous posts about dropping columns.
2026-03-18
197 reads
Answering a couple of questions from the previous posts about dropping columns.
2026-03-18
197 reads
Learn how to use the UPDATE statement, along with a few things to be aware of when changing data.
2025-04-11
1,661 reads
Geographic information systems (GIS) play a critical role in emergency response planning and risk assessment. One of the key challenges in this field is determining whether a specific location falls within an area of interest. This capability is especially valuable for property and casualty (P&C) insurers, who need to assess their insured property exposure when severe weather events such as tornadoes occur.
2025-03-04 (first published: 2025-03-03)
2,691 reads
Microsoft Azure offers Azure Elastic Job agent as a managed service, enabling efficient scheduling of T-SQL workloads on Azure SQL Databases. Learn how to configure the service in this article.
2024-06-07 (first published: 2024-05-24)
1,638 reads
2024-03-29
8,654 reads
Here you will learn about the key differences between the binary and SQL/Windows collations. You will see that even with all sensitivity flags enabled, SQL/Windows collation cannot behave the same way as the binary collations.
2024-03-15
1,935 reads
Introduction In this article, we will see how to work with GitHub Copilot. GitHub copilot is an interesting plug-in that generates code using AI. The technology is from Microsoft and OpenAI. We will show how to install Copilot, and how to generate SQL Server code (T-SQL) using Copilot. First, we will answer some FAQs about Copilot […]
2024-02-12
13,425 reads
Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.
2023-12-11
9,706 reads
2023-11-27
6,094 reads
This article will explain why and how you can easily move tables to new schemas if the need arisees.
2024-10-31 (first published: 2023-11-03)
3,704 reads
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...
By Steve Jones
I come to Heathrow often. Today is likely somewhere close to 60 trips to...
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