Middle+
Kui esimeses tabelis on kolm kirjet ja teises tabelis samuti kolm kirjet, kui palju kirjeid tagastatakse vasakpoolse ühendusega (left join)?
sobes.tech AI
Vastus AI-lt
Performing a LEFT JOIN, the number of records in the result depends on the number of records in the left (first) table and matches with the right (second) table.
If the first table has 3 records and the second also has 3 records, then the LEFT JOIN result will be at least 3 records — one for each record from the left table.
If each record from the left table has a match in the right table, then there will be exactly 3 records.
If some records from the left table have no matches, NULL values from the right table will appear in the result set, but the number of records will remain 3.
In summary: in a LEFT JOIN, the number of records equals the number of records in the left table, which is 3.