SELECT title,name FROM Lessons,Users WHERE Lessons.author = Users.email;
和
SELECT title,name FROM Lessons JOIN Users ON Lessons.author = Users.email;
和
SELECT title,name FROM Lessons INNER JOIN Users ON Lessons.author = Users.email;
Lessons有一个名为author的列,索引为Users.email的外键. title是Lessons中的一列,name是Users中的一列
最佳答案
原文链接:https://www.f2er.com/mysql/432861.html