Database Fundamentals #7: Create a Table Using T-SQL
The syntax for creating a table logically follows many of the same steps that you did when using the GUI,...
2017-08-07
282 reads
The syntax for creating a table logically follows many of the same steps that you did when using the GUI,...
2017-08-07
282 reads
We’re weeks away from another SQL Cruise. If you’ve never heard of this before, follow the link to read more....
2017-08-01 (first published: 2017-07-19)
1,785 reads
OK guys. I think it’s way past time. A bunch of us have been keeping a secret from the rest...
2017-08-01
479 reads
OK guys. I think it’s way past time. A bunch of us have been keeping a secret from the rest...
2017-08-01
221 reads
I read a lot of self-help and improvement information. I’m always trying to hack my brain or my attitude to...
2017-07-31
351 reads
Don’t let the ease of creating databases lull you into a false sense of security. They actually can be very...
2017-07-31 (first published: 2017-07-17)
2,268 reads
The whole idea behind databases is to store information, data, in order to look at it later. The place where...
2017-07-24
527 reads
If you keep your head up and look around you’ll see the choices people make all the time. I saw...
2017-07-21 (first published: 2017-07-10)
1,964 reads
I was given the opportunity to do a little online interview. It’s primarily about promotion, but I thought I’d share...
2017-07-18
299 reads
I love Entity Framework. I also like (not love) nHibernate. That’s right, as a DBA and data professional, I’m telling...
2017-07-17 (first published: 2017-07-05)
2,777 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