课程: Hands-On Introduction: SQL

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Using multiple tables

Using multiple tables

- [Instructor] Now let's learn about the different kinds of joins and subqueries. Joins are used to fetch data from one or more tables at a time. Based on the data we need, joins are categorized into four types: inner, right, left and full outer join. This is the syntax for using joins. Now let's take a look at each of these. Inner join retrieves all rows matching in both tables. So here in this example, it's going to get the matching rows from country_tab and states_tab. Let's look at an example for this. Let's go to chapter one, video five. Joins. So this is the join. I'm using the INNER JOIN first. So here, I give SELECT * FROM country_tab c. C is the alias name that I'm giving for the table name because I don't want to give the table name every single time I'm using it in any condition because that's going to make it very lengthy. So I just want to use the alias name instead of the table name. So I give…

内容