帮我加入同桌 [英] help me join same table

查看:62
本文介绍了帮我加入同桌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2张桌子


桌子人物

ID姓名类型

001一位顾客

002 B销售


表发票


发票ID客户ID销售ID数量

0000001 001 002 10



i想要像这样加入


InvoiceID CustomerID客户名称SalesID SalesName数量

0000001 001 A 002 B 10


请告诉我该怎么做


thx

i have 2 table

table Person
ID Name Type
001 A Customer
002 B Sales

table Invoice

InvoiceID CustomerID SalesID Quantity
0000001 001 002 10


i want to join like this

InvoiceID CustomerID Customer Name SalesID SalesName Quantity
0000001 001 A 002 B 10

pls tell me how to do it

thx

推荐答案

展开 | 选择 | Wrap | 行号


展开 | 选择 | Wrap | 行号


您在第一篇文章中只提到了2个表。在你的最新回复中,看起来它来自四张桌子。你介意发布所有四个表的名称和结构吗?以及你希望他们如何加入?


- CK
you only mentioned 2 tables on your first post. on your latest reply, it looks like it''s coming from four tables. would you mind posting the name and structure of all the four tables? and how you would like them joined?

-- CK


这篇关于帮我加入同桌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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