SQLsubqueryscalartutorial

What is a scalar subquery in SQL? Single value in SELECT for beginners

A scalar subquery is a SELECT that returns exactly one value and slots into a column position or WHERE expression. Plain words: pull one field from a related table, add a summary number to each row of a report, use as a constant in a condition. With tables and common pitfalls.

1 мин четенеSQL · subquery · scalar · tutorial

A scalar subquery is a SELECT that returns exactly one value — one row, one column. You drop it into a column position, a WHERE expression, or a SET assignment, and Postgres substitutes the result.

This article is currently in Russian. The full English translation is on the way.

Упражнявай се на реални задачи

Решавай задачи в SQL тренажора с незабавно оценяване и подсказки.

Отвори тренажора