📜  来自多个表的 mysql 视图 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:52.589000             🧑  作者: Mango

代码示例1
CREATE VIEW V AS (

  SELECT i.country,i.year,p.pop,f.food,i.income FROM
    INCOME i
  LEFT JOIN 
    POP p 
  ON
    i.country=p.country
  LEFT JOIN
    Food f
  ON 
    i.country=f.country
  WHERE 
    i.year=p.year
  AND
    i.year=f.year
);