Sql Query我有两个表。表A(Column1(主键),Column2,Column3)和表B(Column1(主键),Column2(外键(表1中的Column1)),Column3(外键(Column1 With Table)一个))? [英] Sql Query I Have Two Table .Table A (Column1(Primary Key),Column2 ,Column3) And Table B(Column1(Primary Key),Column2(Foreign Key(Column1 With Table A)),Column3(Foreign Key (Column1 With Table A))?

查看:183
本文介绍了Sql Query我有两个表。表A(Column1(主键),Column2,Column3)和表B(Column1(主键),Column2(外键(表1中的Column1)),Column3(外键(Column1 With Table)一个))?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

表A(column1(主键),column2,column3)和表B(column1(主键),column2(外键(表1中的column1)),column3(外键(表1中的column1))< br $> b $ b

朋友如何从表B column2调用表A column1值,column3显示Gridview?

 





请帮助我!!!

< pre lang =text> 

解决方案

尝试:

  SELECT  column1  FROM  [ A] 





这是好朋友,但对不起朋友如何从表B column2调用表A column1值,column3显示Gridview?请帮帮我朋友!!!



不完全确定你想要什么,但......

  SELECT  b.column3,a.column2  FROM  [ B] b 
JOIN [ A] a
ON b.column2 = a.column1



可能是你想要的 - 如果没有,那么尝试给出一个例子而不是随机的例子名称! :笑


Table A (column1(primary key),column2 ,column3) and Table B(column1(primary key),column2(foreign key(column1 with Table A)),column3(foreign key (column1 with Table A))

friend how to call the Table A column1 value from Table B column2,column3 display Gridview?



please help me!!!

<pre lang="text">

解决方案

Try:

SELECT column1 FROM [Table A]



"This is ok fine friend but i am sorry friend how to call the Table A column1 value from Table B column2,column3 display Gridview? please help me friend!!!"

Not exactly sure what you want, but...

SELECT b.column3, a.column2 FROM [Table B] b
JOIN [Table A] a 
   ON b.column2=a.column1


Might be what you want - if not, then try giving an example instead of random example names! :laugh:


这篇关于Sql Query我有两个表。表A(Column1(主键),Column2,Column3)和表B(Column1(主键),Column2(外键(表1中的Column1)),Column3(外键(Column1 With Table)一个))?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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