How to use natural join for multi-table queries in oracle: 1. Automatically match the same columns in the two tables; 2. Specify the columns that need to be displayed; 3. When using natural joins, you cannot specify the columns to be displayed. Specify the table name or table alias.
How to use natural join for multi-table queries in oracle:
1. There is no need to specify a connection in oracle natural join condition, it will automatically match the same columns in the two tables (take the two emp dept tables under user scott as an example).
2. In the natural connection, you can specify the columns that need to be displayed
3. When using natural joins, you cannot specify a table name or table alias for the column to be displayed.
4. When using natural joins, if two If two fields are the same, they will also be matched automatically. (Two tables under the hr user as an example)
5. In fact, although the query methods of natural join and where conditional join are Not the same, but the query results are the same, except that the statement is ideally simplified when using natural joins. As shown below
##Related learning recommendations:
The above is the detailed content of How to use natural join in multi-table queries in Oracle?. For more information, please follow other related articles on the PHP Chinese website!