的錯誤是:「沒有這樣的表中存在」
查詢執行失敗:沒有這樣的表:L.ID1
我使用以下數據庫https://lagunita.stanford.edu/c4x/DB/SQL/asset/socialdata.html和有關表格清楚地存在。我收到這個錯誤的原因是什麼?這裏是我的查詢:
select H.name,H.grade
from Highschooler H, Likes L
where H.ID not in L.ID1 and H.ID not in L.ID2
order by H.grade,H.name
;
運行'.schema'在DB –
我相信你可能希望使用子查詢 - https://www.tutorialspoint.com/sqlite/sqlite_sub_queries.htm –
你想用這個查詢來確定什麼? – duskwuff