DBA 101: Altering a column
People always ask me what tools I use. Mostly this question comes from the topic of monitoring. I can honestly...
2017-02-06 (first published: 2017-02-02)
2,222 reads
People always ask me what tools I use. Mostly this question comes from the topic of monitoring. I can honestly...
2017-02-06 (first published: 2017-02-02)
2,222 reads
Foreign keys are an interesting feature of relational databases. They help enforce data integrity, sometimes help improve performance by eliminating...
2017-01-05 (first published: 2016-12-30)
3,544 reads
I’ve been in technology for twenty years now. I’ve seen hundreds of environments, nearly 300 while employed at Microsoft alone.
One...
2016-12-30
778 reads
I recently worked on a project for fraud. This project needed to relate 67 million accounts to one another “Kevin...
2016-12-27
1,304 reads
I’ve managed to get my hands on a Nintendo NES Classic and I’m going to give it away. The details...
2016-12-13
701 reads
I was building out a blog post about cardinality today and noticed that sys.dm_exec_query_stats was getting cleared my my Surface...
2016-12-27 (first published: 2016-12-08)
2,001 reads
I was recently asked to help tune a stored procedure that has been historically taking between 55 and 60 seconds...
2016-12-15 (first published: 2016-11-30)
4,390 reads
If you’re a DBA or a developer chances are you’ve looked at a query plan or two. While looking at...
2016-11-23 (first published: 2016-11-18)
3,319 reads
If you’re a DBA or database developer, chances are you will have to write or rewrite queries from time to...
2016-11-14 (first published: 2016-11-10)
5,702 reads
Let me start by saying that this isn’t your typical post about the Halloween problem. This is intended to describe...
2016-10-31
982 reads
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...
By Brian Kelley
If your organization is spending money, then meaningful results are a must. Pen testing...
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