本文介紹了mysql如何加入兩個表?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我有兩張桌子:
- id
- 客戶
- 服務
和
- id
- 姓名
- 電子郵件
如何列出表服務并匯集客戶表的客戶名稱?表中的字段customer services 有customer 表中的customer 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
這篇關(guān)于mysql如何加入兩個表?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!