Happy New Year Friends
Wishing all of you a very Happy New Year. May GOD bless all of you with lots of Success and Happiness.
2016-01-01
4 reads
Wishing all of you a very Happy New Year. May GOD bless all of you with lots of Success and Happiness.
2016-01-01
4 reads
SQL Server is a database management system which enables to store and retrieve data from the database. Due to some...
2015-12-31
1,397 reads
SQL Server is a database management system which enables to store and retrieve data from the database. Due to some reasons like virus infection, improper closing of the Server,...
2015-12-31
12 reads
Wishingyoua very
HappyIndependenceDay
" We owe a lot to the Indians, who taught us how to count, without which no worthwhile scientific...
2015-08-15
738 reads
Wishing you a very
Happy Independence Day
" We owe a lot to the Indians, who taught us how to count, without which no worthwhile scientific discovery could have been made....
2015-08-15
6 reads
Sometime we need to find all the triggers defined on the database. So in this case, we can use the...
2015-08-14
1,675 reads
Sometime we need to find all the triggers defined on the database. So in this case, we can use the below SQL Query:-SELECT tbl.name as [Table Name] ...
2015-08-14
10 reads
Through this article, we are going to discuss three important interview questions of SQL which are given below:-
1) Can we...
2015-08-13
6,971 reads
Through this article, we are going to discuss three important interview questions of SQL which are given below:-
1) Can we create clustered index on a column containing duplicate values?
2) Can we create...
2015-08-13
9 reads
Suppose we have a table emp_plan which contains 4 columns "Empid" (employeeid), Planid (Projectid), Startdate(Allocation Start date) and Enddate (Allocation Enddate)....
2015-08-03
668 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