In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to carry out joint query in navicat, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Cartesian product
Multi-table queries, separated by commas between table names. In this way, all the data in multiple tables will be checked out, and the way to find out is the way of Cartesian product (complete combination).
Many of the data found in this way are invalid. You can add conditions to a multi-table query to find the information you want.
Internal connection
Valid information can be filtered through the associated attributes between tables when designing the database.
Explicit internal connection
SELECT * FROM employee AS E1, enterprise AS e2 WHERE e1.enterpriseId-e2.id
Implicit internal connection
SELECT * FROM employee E1 INNER JOIN enterprise e2 ON e1.enterpriseId=e2.id
There is no essential difference between implicit and explicit internal joins.
External connection
Based on one table, all the data in this table is checked out, and then it is associated with another table. If it is associated with it, its information is displayed, and if it is not associated, it is not displayed as null.
Left outer connection
SELECT * FROM employee E1 LEFT JOIN enterprise e2 ON e1.enterpriseId=e2.id
Right outer connection
SELECT * FROM employee E1 RIGHT JOIN enterprise e2 ON e1.enterpriseId=e2.id
Alias of the table
There are two reasons to use aliases for tables:
1. For convenience and simplicity.
two。 If you are making a multiple table query from a duplicate table, you must use an alias.
There are two ways to use aliases:
1. Just add a space after the name of the table and give it a new name.
SELECT * FROM employee E1, enterprise e2 WHERE e1.enterpriseId-e2.id
2.as is no different from naming it directly, but it looks like a more standard sql statement will be easier to see.
SELECT * FROM employee AS E1, enterprise AS e2 WHERE e1.enterprise navicat e2.id; above is all the content of this article entitled "how to federate query in enterprise? thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.