T
T
tisprk2021-01-28 13:32:17
SQL
tisprk, 2021-01-28 13:32:17

How to refer to a subquery?

Have a nice day.
We have a request for the following structure

select t.*, t3.name1, t3.name2
from (
    select field1, fiel2, fiel3
    from table1
   inner join table2 on условие
) t
inner join table3 t3 on t3.name7 = t.field6


I get an error when accessing through the alias t
How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tisprk, 2021-01-28
@tisprk

Actually, the phrase "the fool himself" fits as an answer. I
caught the problem because inside the request, t assigned aliases to the fields on which I made the link. When contacting through aliases, the problem is gone.
Thanks to everyone who managed to get distracted by my problemma

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question