mysql如何联接两个表? [英] How to join two tables mysql?

查看:65
本文介绍了mysql如何联接两个表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个表:

  • id
  • 客户端
  • 服务

  • id
  • 名称
  • 电子邮件

如何列出表服务并将客户表的客户名称汇总在一起?表中的现场客户服务在客户表上具有客户的ID,

How to list table service and bring together the customer name that the customers table? field customer services in the table has the id of the customer at the customer table,

我非常感谢您的帮助

推荐答案

SELECT * FROM table1 LEFT JOIN table2 on table1.id = table2.id

这篇关于mysql如何联接两个表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆