Join two mysql tables

后端 未结 3 1022
小鲜肉
小鲜肉 2021-01-28 15:11

I have two databases - one for articles and the another for the articles\' meta information (Like author, date, category and atc.). I have the following columns in meta table: I

3条回答
  •  后悔当初
    2021-01-28 16:07

    SELECT * FROM article_table RIGHT JOIN meta_table ON article_table.article_id = meta_table.article_id;

    You get repeats from the article table, but it gets all the meta data in a single query. I believe otherwise you need to use multiple.

提交回复
热议问题