如何在Mysql里面使用union

2026-04-11 11:20:06

1、打开终端窗口。

如何在Mysql里面使用union

2、mysql -uroot -p进入mysql。

如何在Mysql里面使用union

3、查看数据库,并且用数据库。

如何在Mysql里面使用union

如何在Mysql里面使用union

4、先查看一下表格的数据。

如何在Mysql里面使用union

5、用两个SELECT FROM语句,然后中间加UNION来合并。

如何在Mysql里面使用union

6、还可以用as来定义结合表格的名字。

如何在Mysql里面使用union

如何在Mysql里面使用union

7、我们还可以用多个表格里面的表头。

如何在Mysql里面使用union

如何在Mysql里面使用union

相关推荐
  • 阅读量:68
  • 阅读量:193
  • 阅读量:70
  • 阅读量:51
  • 阅读量:96
  • 猜你喜欢