使用带有多个数据库表语句的`INNER JOIN`时意味着什么?

我正在使用Ruby on Rails 3.2.2和MySQL。 我有一个生成以下SLQ查询的方法( has_many :through ActiveRecord::Associations ):

 SELECT DISTINCT `articles`.* FROM `articles` INNER JOIN `articles_comments_associations` `comment_associations_articles` ON `comment_associations_articles`.`article_id` = `articles`.`id` INNER JOIN `articles_comments_associations` ON `articles`.`id` = `articles_comments_associations`.`article_id` WHERE `articles_comments_associations`.`comment_id` = 223 AND (articles_comments_associations.user_id IN (2)) 

我想理解INNER JOIN 'articles_comments_associations' 'comment_associations_articles'注意INNER JOIN有多个数据库表语句)以及SQL查询如何工作,因为我没有名为comment_associations_articles的数据库表这是一个错误 (即使它按预期工作)

这是一个表别名。 这意味着,它将表articles_comments_associations重命名为comment_associations_articles ,以便在查询中进一步引用。 通过在表/字段引用之后简单地给出另一个名称,可以对任何字段或表进行别名。