ppcine for tv

Sql Joins Notes Pdf • Verified Source

| student_id | course | |------------|-----------| | 1 | Math | | 2 | Science | | 4 | Art | Returns only rows with matching keys in BOTH tables.

-- Query: Books with author names SELECT b.title, a.name FROM books b LEFT JOIN authors a ON b.author_id = a.id; sql joins notes pdf

SELECT * FROM students INNER JOIN courses ON students.id = courses.student_id; | id | name | student_id | course | |----|-------|------------|---------| | 1 | Alice | 1 | Math | | 2 | Bob | 2 | Science | | student_id | course | |------------|-----------| | 1

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *