如何使用多列表显示在一列中的名称 [英] how to dsiplay the name from using the mutiple tables display in one column

查看:53
本文介绍了如何使用多列表显示在一列中的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三张桌子如下





第一桌名字A



名字Ram



第二桌名称B



中间名Madan



第三桌名称C



姓氏Gopal









使用上面的三个表A,B和C我希望显示使用的名字,中间名和姓氏以上三张桌子。





我想要的输出如下



名称

RamMadanGopal







我怎么能写sql查询。





请帮帮我。





问候,

Narasiman P.

i have three table as follows


First Table Name A

First Name Ram

Second Table Name B

Middle Name Madan

Third Table Name C

Last Name Gopal




from using the above three tables A,B and C i want to display First Name,Middle Name and Last Name from using the above three tables.


Ouput i want as follows

Name
RamMadanGopal



for that how can i write the sql query.


please help me.


Regards,
Narasiman P.

推荐答案

你不能从那些小信息中获取,因为没有任何关联的信息三张桌子在一起。如果您有一个引用其他表的ID,或者这三个共同的ID,那么您可以:

You can't from that little information, as there is no information which ties the three tables together. If you have an ID which refers to the other tables, or which is common to all three, then you can:
SELECT a.Name + b.Name + c.Name FROM FirstTable a
JOIN SecondTable b ON a.ID=b.ID
JOIN ThirdTable c ON a.ID=c.ID


这篇关于如何使用多列表显示在一列中的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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