Home  >  Article  >  Database  >  sqlserver-Why do I use left join, join, and right join to have the same effect?

sqlserver-Why do I use left join, join, and right join to have the same effect?

WBOY
WBOYOriginal
2016-09-12 17:27:071756browse

sqlservermysqloracle database

The results found have not changed at all. I went to Baidu and read a lot but still don’t understand. Please give me an answersqlserver-Why do I use left join, join, and right join to have the same effect?

Reply content:

This is related to the data in your two tables.
If you delete a piece of data in a certain table, the other table will not be affected.
You can see the difference.

Are the contents of the two tables matching, so the results of the left and right joins are the same?
Try making a table lose one row of data.

You modify the data so that some of them cannot match. The best verification method is to leave the values ​​​​of some fields blank

I don’t know how to say this, is it right? Please forgive me if it’s wrong. I’m also a newbie. For example, there are two tables, table a and table b. Table a has 50 data and table b has 100 data. The two tables match. It is 50 pieces of data, use left join
It is mainly based on table A. When you query, it is mainly based on the information of table A. It displays 50 pieces of data, and the remaining 50 pieces of data are all null.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn