DECLARE @tbla TABLE (ID INT)
INSERT INTO @tbla
SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 1
DECLARE @tblB TABLE (ID INT)
INSERT INTO @tblb
SELECT 1 UNION SELECT 3 UNION SELECT 4
DECLARE @tblC TABLE (ID INT)
INSERT INTO @tblc
SELECT 3 UNION SELECT 4
DECLARE @tbld TABLE (ID INT)
INSERT INTO @tbld
SELECT 2 UNION SELECT 3
SELECT
*
FROM
@tbla a
LEFT JOIN
@tblB b ON a.id = b.id
LEFT JOIN
@tblC c ON b.id = c.id
INNER JOIN
@tbld d ON a.ID = b.ID
Какая польза от inner join
в моем запросе? Это объявление правильно? Или не так?