D
D
Denis Kuznetsov2019-12-21 11:35:57
SQL Server
Denis Kuznetsov, 2019-12-21 11:35:57

What is the difference between standalone and correlated subqueries?

Hello, I tried to google different subqueries, but I didn’t really find anything about “autonomous” ones.
As I understand the following query

select e.FIO, e.Schet, s.Salary_data 
from Employee e, Salary s 
where e.Employee_ID = s.Employee_ID and s.Salary_data < 
(select Salary_data 
from Salary 
where Employee_ID = 1);

to tables
5dfdd8cda961d222462283.jpeg
5dfdd8e1831df705959898.jpeg
is correlated
, what does a standalone query look like, how is it built and what is the difference?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Лентюй, 2019-12-21
@BojackHorseman

если подзапрос использует значения из другого запроса, то он Correlated subquery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question