<

Query data with no SQL code (9)

Posted on
6,116 Points
16 Views
1 Endorsement
Last Modified:
Published
Experience Level: Beginner
6:20
Máté Farkas
Database Expert with 15+ years experience (SQL, Access, Power BI).
Section 09: Join subquery to existing tables in a query

Course: This course is created for business people or data analysts who want to query data from an SQL Server database but don't want to write codes and queries in SQL language. This course teach you how to use GUI of SQL Server Management Studio Query Designer Tool.

Video Steps

01. 00:00 Define a connection between a table and a subquery

This part shows how to define the connection
between existing tables and subquery in our main query. This is the JOIN.

02. 00:51 Understanding NULL behavior in JOINs

You will see that NULLs returned by the subquery will be eliminated by the JOIN because it cannot be match any values in the connecting table even if it also has a NULL row.

03. 01:17 Understanding INNER JOIN

Here you can see how INNER JOIN hides non matching rows from the result.

04. 01:52 Understanding LEFT JOIN

This is the solution to display all rows from the table right hand side and only matching rows from the right hand side table or subquery.

05. 02:33 Replacing NULL by using ISNULL function

This trick replaces NULLs to a default value you defined

06. 03:56 Add more subqueries to the main query

Here you can see that a query can contain any subqueries.

07. 04:42 Using the LIKE operator

Learn how to create a criteria finding only a part of a text.
1
1 Comment
LVL 28

Author Comment

by:Máté Farkas
Jump to next section:Query data with no SQL code (10) - 10. Using multiple subqueries in a query
Jump to prev section:Query data with no SQL code (8) - 8. Include a subquery into another query
0
An introduction article to discuss about the various Database states for troubleshooting or health check purposes. More articles will be available in this series to see how to troubleshoot each and every states described in this article.
I was surprised on searching desperately not to find a clear answer for what would appear outwardly to be a fairly simple operation in a Microsoft SQL database server. Alter the column width of a text field from 48 to 60 and retain the primary key.…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month