In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
-- taking this example as an example, we first introduce several commonly used table joins. In this example, only left join is used. Others can try-test:
Join within inner join, the result is that both tables contain rows of Sid
-- left join is connected to the left. The result is the Sid in the left table, and the null value null is not found in the right table.
-- right join join to the right. The result is based on the Sid in the right table, and the null value null is not found in the left table.
-- full outer join full external connection, the result is containing two tables of data
Example: inquire about the information and course scores of students with higher scores in "01" than in "02".
-- 1. The first method: connect to the left, query the student information of both '01' and' 02' courses, and then compare, isnull usage, return score if score has a value, and return 0 if score is null
Select a. Score for course '01', c.score [score for course' 02'] from Student a
Left join SC b on a.Sid=b.Sid and b.Ciddance 01'
Left join SC c on a.Sid=c.Sid and c. Ciddance 02'
Where b.score > isnull (c.scorePhone0)
2. The second way of writing
Select a.*, b.score [score for course '01'], c.score [score for course' 02'] from Student a, SC b, SC c
Where a.Sid = b.Sid and a.Sid = c.Sid and b.Cid = '01' and c.Cid =' 02' and b.score > c.score
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.