Easy way to reseed identity column ? TIP #77
Sometimes, we may require to reseed identity column of a table due to various reason.
For example we have deleted a...
2014-12-20
514 reads
Sometimes, we may require to reseed identity column of a table due to various reason.
For example we have deleted a...
2014-12-20
514 reads
Although it is a old feature for those who knows ORACLE but for SQL server developers it is a new...
2014-12-10
265 reads
When you do SQL Server maintenance one of important aspect is available space on server drive because your SQL SERVER...
2014-12-06
334 reads
You are reading this post just because of two reason
1) You are curious whether it is possible or not...
2014-11-20
282 reads
Sometimes it may require that you don’t know what will be output of a stored procedure ? what kind of result...
2014-11-19
454 reads
This is very interesting feature and I recently come to know this awesome feature.
Lets understand this by an example below...
2014-11-14
327 reads
Suppose, sometimes you just need entry in the table with all the default values.
For example you have a Student...
2014-11-10
210 reads
Suppose, We are working on a stored procedure in which some complex operation is going. We are fetching some value...
2014-11-09
284 reads
Hello friends,
Many times it happened with me I forgot the instance name of SQL Server.
So here is a small trick...
2014-11-07
294 reads
Recently , one of my friends shared that some interviewer asked him a question “How to copy table structure only from...
2014-11-03
748 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