Get the App
SLTechnology News&Howtos  ›  Database  › 

Query method of connecting inner join in MSSQL

Shulou Source: shulou.com Published: 2022-05-31 21:32:25 10月30日 Update

This article introduces the relevant knowledge of "the query method of connecting inner join in MSSQL". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

For example, Table A:

Sid sname

1 kkkkkkd

2 ahuinan

Table B

Id smoney sid

1 100 1

2 200 1

3 150 2

The desired result:

Sid sname smoney

1 kkkkkkd 300 (100,200)

2 ahuinan 150

Reference:

Select A. Sname As Smoney (B.Smoney)

From dichan_item B inner join dichan_user A

On B.Suserid=A.id

Group by B.Suserid,A.Sname

Order by sum (B.Smoney)

This is the end of the content of "query method for connecting inner join in MSSQL". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Method query content more knowledge practicality achievement next dilemma reality situation article case result ribbon website industry process high quality reference Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS Microsoft Linux vpn