Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MySQL-如何连接两个将行转换为列的表_Mysql_Join_View - Fatal编程技术网

MySQL-如何连接两个将行转换为列的表

MySQL-如何连接两个将行转换为列的表,mysql,join,view,Mysql,Join,View,我在MySQL中有两个表,一个是application,另一个是application\u storefront。它们看起来像这样: 应用程序: application_id | title ------------------------------------ 529479190 | Clash of Clans 553834731 | Candy Crush Saga 以及table application_storefront,即应用程序所

我在MySQL中有两个表,一个是application,另一个是application\u storefront。它们看起来像这样:

应用程序:

application_id | title           
------------------------------------
529479190      | Clash of Clans  
553834731      | Candy Crush Saga
以及table application_storefront,即应用程序所在的国家/地区:

application_id | country_code
--------------------------------
529479190      | USA
529479190      | GBR
529479190      | AUS
我想创建一个视图或一个新表,每个国家/地区代码作为一列,然后标记该应用程序是否在该国家/地区可用

application_id | title           | USA | GBR | AUS | etc...
--------------------------------------------------------
529479190      | Clash of Clans  |  1  |  1  |  0  | etc...

如何在MySQL中实现这一点?

它通常被称为一个支点,世界上有196个国家。对于表列和按名称访问这些列,请记住这一点。那对我来说是不可能的