categories: computer science
Hello everyone,
Below you will find a video with a detailed explanation of the statements and keywords: INNER JOIN, LEFT JOIN, RIGHT JOIN, NULL, AS. It covers how they work, their time complexity, and their usefulness. Below you will also find ready-to-copy code in case you need it.
Query 1:
SELECT uczniowie.IdUcznia AS ID,
uczniowie.Imie AS IMIE,
srednia.Srednia AS SREDNIA
FROM uczniowie
RIGHT JOIN srednia ON uczniowie.IdUcznia = srednia.Id;
Statements: SELECT, AS, FROM, RIGHT JOIN, ON
Query 2:
SELECT uczniowie.IdUcznia, uczniowie.Imie, srednia.Srednia
FROM uczniowie
INNER JOIN srednia ON uczniowie.IdUcznia = srednia.Id;
Statements: SELECT, FROM, INNER JOIN, ON
Query 3:
SELECT uczniowie.IdUcznia, uczniowie.Imie, srednia.Srednia
FROM uczniowie
LEFT JOIN srednia ON uczniowie.IdUcznia = srednia.Id
WHERE nazwisko IS NULL;
Statements: SELECT, FROM, LEFT JOIN, ON, IS, NULL
Video:
Thank you for reading!
Read more