Viacheslav Maliutin


SQLServerCentral Article

Should I Type * or 1 With the EXISTS Logical Operator

In my project I see that people writes different things with EXISTS logical operator (EXISTS (SELECT StarOrOne FROM...)). They are "*", "1" and even "TOP 1 1" or "TOP 1 *". The aim of this article to give a good explanation which option is the best.

(44)

You rated this post out of 5. Change rating

2020-01-24 (first published: )

14,887 reads

Blogs

T-SQL Tuesday #198 Invitation: How Do You Detect Data Changes?

By

It's time for T-SQL Tuesday #198! This month's topic is change detection. The post T-SQL...

Understanding Fabric MCP

By

Model Context Protocol, or MCP, is one of those technical ideas that sounds more...

AWS RDS Aurora - our first approach

By

When starting with AWS RDS Aurora for managing relational databases in the cloud, many...

Read the latest Blogs

Forums

BCA KCP Gading Bukit Indah TLP/Hub 08216977701

By pinoyteleserye

Jl. Raya Gading Kirana Blok D/1, Klp. Gading Bar., Kec. Klp. Gading, Jkt Utara,...

BCA KCP Kelapa Gading Hibrida TLP/WA 08216977749

By pinoyteleserye

Jl. Boulevard Raya No.14 Blok RA-1, RW.15, Klp. Gading Tim., Kec. Klp. Gading, Jkt...

BCA KCP Semper TLP/HUB 08216977701

By pinoyteleserye

Jl. Plumpang Semper No. 02 RT 010/002, Daerah Khusus Ibukota Jakarta 14260

Visit the forum

Question of the Day

Creating a JSON Document III

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 TOP 2 
  json_objectagg('Team' : TeamName)
FROM dbo.NFLTeams;

See possible answers