D
D
dqwe932017-09-16 18:17:45
1C
dqwe93, 2017-09-16 18:17:45

When do you need to use union/join?

Hello, I came across queries, but I don’t understand a little where to use, for example, a join instead of a join, or why use batch queries or nested queries.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kinash, 2017-09-16
@Dementor

Roughly speaking, then:
Join - adds new rows to the result table
Join - adds new columns to the result table
Subquery - allows you to get an additional table (which is generated by a query) at a single point for a join, join, condition or other operations.
Batch query - allows you to create a temporary table earlier, which can be used several times later in the query text.
As a training example for the above:
1) in the package, first we make a request for a filter by goods to the Nomenclature directory, where in the WHERE section there will be a condition for the link to appear in the results of a nested query for sales in a period specified by the user, and the result is placed in a temporary table.
2) in the second query of the package, we merge the selections by the commodity structure of the documents ordering goods and selling goods, each of which will be connected by an inner join to a previously formed temporary table to cut off uninteresting information and add the missing column with the article number to the result.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question