Supercharge Your SQL Server Scalar Functions By Switching To Table Value Functions
User defined functions in SQL server can cause all kinds of performance problems, there are however some tricks that are...
2019-01-18
290 reads
User defined functions in SQL server can cause all kinds of performance problems, there are however some tricks that are...
2019-01-18
290 reads
Scripted Simulation of SQL Server Loads
When blogging, presenting or testing an idea, one issue I constantly have is that my...
2019-01-17 (first published: 2019-01-11)
2,333 reads
I know, I know your data could never possibly have duplicates because obviously, you have all the constraints in place...
2019-01-09 (first published: 2019-01-03)
2,991 reads
I’ve done a few posts on Clustered and Non-Clustered indexes before, what I’ve not however covered and something that is...
2019-01-09
245 reads
OK, so profiler isn’t actually dead, it has however been deprecated since 2012 and has had no new features since...
2019-01-07
548 reads
Indexing on In Memory OLTP tables is a little different from your traditional on-disk rowstore tables…
In Memory Differences…
There is no...
2018-12-24 (first published: 2018-12-04)
2,911 reads
Since SQL 2012 some really awesome new technologies have been introduced into the engine that are massively underused. Everyone is...
2018-12-19 (first published: 2018-12-03)
2,273 reads
Every language handles null equality differently and understanding this is crucial as a misunderstanding here can lead to some quite...
2018-12-14 (first published: 2018-11-29)
3,219 reads
In the interests of curiosity I’m going to take a query that runs a relatively simple aggregation over a large...
2018-12-10
295 reads
Since SQL Server 2014 SP1 we’ve had DMV’s that can support Live Query Statistics (Basically a query plan that gives...
2018-12-06 (first published: 2018-11-24)
3,462 reads
By Steve Jones
I went to sleep while reading a Kindle book on my phone. I know...
A conversation with Jan Laš, CIO at HOPI, about what deploying a data agent...
It's time for T-SQL Tuesday #198! This month's topic is change detection. The post T-SQL...
We suffered a SPAM attack from May 1-6, which unfortunately corresponded with time off...
Hi to all We have situation at a client where someone is illegally changing...
Hi to all We have situation at a client where someone is illegally changing...
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 1960If I run this code, how many rows are returned?
SELECT TOP 2
json_objectagg('Team' : TeamName)
FROM dbo.NFLTeams;
See possible answers