SQLLearn

PHOTO EMBED

Wed Aug 17 2022 01:03:46 GMT+0000 (UTC)

Saved by @vnmshenoy

SELECT *
FROM STUDENT as s1
JOIN  STUDENT as s2
on s1.id=s2.id
WHERE s1.room_id=8
and s1.id!=1
content_copyCOPY

https://learnsql.com/track/sql-from-a-to-z/course/sql-queries/joins/aliases/self-joins