SQL Server JOINS: Are JOIN LEFT OUTER commands associated by default in SQL Server?

I have about 6 months of work experience in SQL, TSQL, SSIS, ETL. As I use instructions more often JOINin my project experience, I experimented with various operators JOIN. I wanted to confirm my conclusions. Are the following statements accurate regarding the conclusion JOINto SQL Server?:

1) I fulfilled the request LEFT OUTER JOINand fulfilled the same request using JOINwhich gave the same results; all JOINstatements LEFT OUTERrelated to SQL Server?

2) I made a LEFT OUTER JOIN WHERE2nd PK table (joined) IS NOT NULLand made the same query using INNER JOINwhich gave the same results; Is it possible to say that the operator INNER JOINwill give only consistent records? and matches LEFT OUTER JOINwhere records are combined IS NOT NULL?

The reason I ask is because I used only LEFT OUTER JOINSbecause I was comfortable. However, I want to eliminate as much code as possible when writing queries to improve efficiency. I just wanted to make sure my observations were correct.

Also, are there any tips you could provide to easily figure out which operator JOINis suitable for specific queries? For example, which one JOINwould you use if you wanted to get inconsistent records?

Thank.

+4
2

A join inner join ( ) A B, , 1, A B, 1.

A left outer join A B 1 A B, 1, A.

1 A 1, B, B null 1, A , . , join, inner join.

, join A B, left outer join A B, , , , . B B, A, B.

, where, on , . A B, A , B, , B, on, where, , , . , b.field4 = 12 WHERE, B A, , , , . , , .

+2

JOIN "INNER JOIN"

+1

Source: https://habr.com/ru/post/1540917/


All Articles