External Article

Make SQL Server monitoring part of your deployment process for 2020

As we approach 2020, demand for more frequent deployments continues to rise. With this, management of SQL Server availability needs to evolve.

Now’s the time to consider how SQL Server monitoring could improve your deployment performance. In this whitepaper, learn how SQL Server monitoring can help your development and DBA teams work together to remove bottlenecks and enable faster, more reliable deployments.

SQLServerCentral Editorial

A Faster tempdb

I like to call tempdb the “workhorse” of SQL Server. I’ve heard some other people call it other terms that were not so flattering, but since I like to keep things positive, I’ll stick with workhorse. SQL Server uses tempdb for many things. The obvious uses are temp tables and table variables, but tempdb is […]

Blogs

SSMS Evaluation – future ready

By

In previous posts, we looked at the SQL Server engine. for us DBAs, the...

Claude.ai vs Claude API

By

You have used Claude. But which Claude? The Claude app (claude.ai, the desktop and...

T-SQL Tuesday #198–Change Detection

By

This month we have a new host, Meagan Longoria, who graciously agreed to help...

Read the latest Blogs

Forums

Creating a JSON Document IV

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Creating a JSON Document IV

Permissions Removal When Changing Object Schema

By Brandie Tarvin

When the schema of an object is changed, SQL Server wipes out the previous...

Visit the forum

Question of the Day

Creating a JSON Document IV

I have this data in a table called dbo.NFLTeams

TeamID  TeamName       City             YearEstablished
------  --------       ----             ---------------
1       Cowboys        Dallas           1960
2       Eagles         Philadelphia     1933
3       Packers        Green Bay        1919
4       Chiefs         Kansas City      1960
5       49ers          San Francisco    1946
6       Broncos        Denver           1960
7       Seahawks       Seattle          1976
8       Patriots       New England      1960
If I run this code, how many rows are returned?
SELECT 
  YearEstablished,
  json_objectagg(city : TeamName)
FROM dbo.NFLTeams
GROUP BY  YearEstablished;

See possible answers