Sql语句从关联的两张表中选择数据

文章表A有字段id,title,authorID,作者表B中有字段authorID,name,现在想要一条sql语句根据文章id=3并且同时选出作者name,sql语句怎么写?

select title, name
from A,B
where a.id = 3
and a.authorID= b.authorID;追问

如果是所有的呢?想选择所有的文章并且显示他们作者的名字,求解答。

追答

select title,name
from A,B
where a.authorId=b.authorID(+);

温馨提示:答案为网友推荐,仅供参考
相似回答