TSQL Snippet for viewing basic info on database principals and their permissions
Quick snippet I put together for reviewing basic info on database users/principals, permissions, and members if the principal is a...
2013-05-31
1,528 reads
Quick snippet I put together for reviewing basic info on database users/principals, permissions, and members if the principal is a...
2013-05-31
1,528 reads
Msg 402, Level 16, State 1, Line 67
The data types varchar and void type are incompatible in the add...
2013-05-30
1,374 reads
Snippet to quickly view computed column information. You can also view this by doing a “create table” script. This however,...
2013-05-22
577 reads
For sake of future generations, let’s begin to reduce typing and reuse code we’ve built. I think we can all...
2013-05-22
1,301 reads
If you want to audit your enviroment to look at all your synonyms and see where they are pointing, you...
2013-05-21
816 reads
Handling dates is always a fun challenge in T-SQL! Finding the current end of month and next months beginning of...
2013-05-01
2,222 reads
SQL Server Management Studio (SSMS) is not offered as a standalone download on MSDN.
Installation requires the user to download the...
2013-05-07 (first published: 2013-04-30)
26,604 reads
Snippet to designate a certain time of the day to evaluate in the current day. If you need to limit a...
2013-04-23
354 reads
Intellisense can be a boon to adding quick development. Quick hints on scope specific variables, syntax suggestions, function descriptions and...
2013-04-22
921 reads
Dynamic SQL can be helpful, but a pain to debug. I spent hours today working on figuring out why my...
2013-04-18
432 reads
By Steve Jones
One of the nice things about Flyway Desktop is that it helps you manage...
By HeyMo0sh
Microsoft Fabric (not to be confused with the more general term “fabric” in DevOps)...
By James Serra
I’m honored to be hosting T-SQL Tuesday — edition #192. For those who may...
I'm fairly certain I know the answer to this from digging into it yesterday,...
Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production...
hi everyone I am not sure how to write the query that will produce...
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 *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers