Playback starts YouTube’s embedded player (privacy-enhanced mode).
13 MySQL Tutorial for Beginners: Table Aliases, Self Joins
ChannelgolearnfastDescription from the creator
When you name a table to be joined in the FROM clause, you can refer to that table by an alias.
A table alias is just an alternative table name and you code it just near the table’s name.
After you assign a table alias, you must use the alias in place of the original table name everywhere in the query.
It’s recommended to use abbreviations of the table names which consist of just one letter or two.
After you assign a table alias, you must use the alias in place of the original table name everywhere in the query.
In other words you can't use the original table name anymore. Otherwise, MySQL returns an error message.
Although a join condition typically consists of a single comparison, you can include two or more comparisons in a join condition using the AND and OR operators.
You can also join more than two tables. You can think of a multi-table join as a series of two-table joins proceeding from left to right.
If you need a WHERE clause and an ORDER BY clause, you code them to the end of the statement.
Note that the conditions specified in the WHERE clause is applied after the condition specified in the ON phrase.
A self-join is a common join that joins a table to itself.
Since in a self-join you use the same table twice, you must use aliases to distinguish one occurrence of the table from the other .
In addition, the query must qualify each column name with a table alias since every column occurs in both tables.
EXERCISES for your SELF-TRAINING:
golearnfast.com/Quizzes.php?_SelectSmallerGroup…
SCRIPT FOR THE EXAMPLES:
golearnfast.com/files/lessons_material/lesson_2…
SUBSCRIBE!
youtube.com/channel/UCMEaGDoHU7c9tWyafZ9vC6Q?su…
FACEBOOK
facebook.com/golearnfast
GOOGLE+
plus.google.com/u/0/b/101326338689489366802/
A table alias is just an alternative table name and you code it just near the table’s name.
After you assign a table alias, you must use the alias in place of the original table name everywhere in the query.
It’s recommended to use abbreviations of the table names which consist of just one letter or two.
After you assign a table alias, you must use the alias in place of the original table name everywhere in the query.
In other words you can't use the original table name anymore. Otherwise, MySQL returns an error message.
Although a join condition typically consists of a single comparison, you can include two or more comparisons in a join condition using the AND and OR operators.
You can also join more than two tables. You can think of a multi-table join as a series of two-table joins proceeding from left to right.
If you need a WHERE clause and an ORDER BY clause, you code them to the end of the statement.
Note that the conditions specified in the WHERE clause is applied after the condition specified in the ON phrase.
A self-join is a common join that joins a table to itself.
Since in a self-join you use the same table twice, you must use aliases to distinguish one occurrence of the table from the other .
In addition, the query must qualify each column name with a table alias since every column occurs in both tables.
EXERCISES for your SELF-TRAINING:
golearnfast.com/Quizzes.php?_SelectSmallerGroup…
SCRIPT FOR THE EXAMPLES:
golearnfast.com/files/lessons_material/lesson_2…
SUBSCRIBE!
youtube.com/channel/UCMEaGDoHU7c9tWyafZ9vC6Q?su…
facebook.com/golearnfast
GOOGLE+
plus.google.com/u/0/b/101326338689489366802/
About this tutorial
golearnfast published this 7:13 video tutorial on October 27, 2016. It has been watched 12,663 times on YouTube.
- Channel
- golearnfast
- Category
- Education
- Duration
- 7:13
- Published
- October 27, 2016
- Views
- 12,663
- Likes
- 88
Tags
Share
This tutorial in other languages
- FR13 MySQL Tutorial pour les débutants: Tableau Alias, auto-jointures
- ES13 MySQL Tutorial para principiantes: Tabla Alias, Auto se une
- PT13 MySQL Tutorial para Iniciantes: Tabela Aliases, Auto junta
- IT13 MySQL Tutorial per principianti: Tabella Alias, entra a far parte Auto
- DE13 MySQL Tutorial für Anfänger: Tabelle Aliases, Selbst Joins
- NL13 MySQL Tutorial voor beginners: tabelaliassen, Self sluit zich aan
- RU13 MySQL Учебник для начинающих: Псевдонимы Таблицы, Self Присоединяется
- PL13 MySQL Tutorial dla początkujących: Tabela Pseudonimy, Self Dołącza
- JA初心者のための13のMySQLチュートリアル:表の別名は、セルフジョイン
- AR13 ماي دروس للمبتدئين: الجدول الأسماء المستعارة، ينضم الذاتي
- HIशुरुआती 13 MySQL ट्यूटोरियल: टेबल उपनाम, स्व में शामिल
- ID13 MySQL Tutorial untuk Pemula: Tabel Alias, Self Bergabung