How To Get Table Row Counts Quickly And Painlessly
Use sysindexes\DMVs insead of select count(*) to retreive table row counts
2011-01-28 (first published: 2009-09-02)
57,773 reads
Use sysindexes\DMVs insead of select count(*) to retreive table row counts
2011-01-28 (first published: 2009-09-02)
57,773 reads
After a year of planning I'm proud to announce that South Orlando has a new PASS chapter: MagicPASS! Our first...
2011-01-13
988 reads
This post is a part of T-SQL Tuesday, a monthly event where SQL bloggers post about a common topic. This...
2011-01-11
675 reads
Even though I live in Orlando - just a hop, skip, and jump away from Tampa - I've missed their SQLSaturday for...
2011-01-05
562 reads
Jack Corbett posted the official announcement to his blog - I'm posting here as well to make sure we reach as...
2011-01-04
362 reads
I started the year with 10 Goals for 2010 and now I'll end it by looking at how many of...
2010-12-31
1,593 reads
Speakers and bloggers alike crave feedback (good or bad) so I was excited to see my session evaluations from the...
2010-12-23
1,043 reads
2010 is rapidly coming to a close and in retrospect this has been a fantastic year of growth for the...
2010-12-17
1,185 reads
How time flies - it really has been almost 2 1\2 weeks since the 2010 PASS Summit came to a close!...
2010-11-30
1,492 reads
The 2010 PASS Summit has been over for a week and a half now and I've finally recovered & processed everything...
2010-11-23
683 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