我想加入两个表:book_details
的那些书中的imdb_index
和imdb_index is >=600;
这是我尝试过的:
select *from imdb_index where imdb_index>=600 as x join book_details as y on x.isbn=y.isbn;
答案 0 :(得分:1)
SELECT * FROM imdb_index AS x JOIN book_details AS y ON x.isbn = y.isbn
WHERE x.imdb_index>=600;
有关加入访问的更多详细信息 https://www.mysqltutorial.org/mysql-join/
答案 1 :(得分:0)
where和join子句放在错误的位置
select *
from imdb_index x
join book_details y on x.isbn=y.isbn
where y.imdb_index>=600 ;
join子句必须在where子句
之前答案 2 :(得分:0)
通过使用以下查询,您将能够从imdb_index为> = 600的表中获取数据。
select *
from imdb_index as im
join book_details as bd
on im.isbn = bd.isbn
where im.imdb_index>=600;
您在where
之前使用join
条件。您应该先执行Join
,然后才应该使用where
强烈建议您阅读并观看有关joins
的一些教程。
以下链接将为您提供帮助。