Access中的联接多表问题

编程入门 行业动态 更新时间:2024-10-26 23:29:53
本文介绍了Access中的联接多表问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好所有访客 我在访问时遇到问题. 我尝试在Access中显示3个表中的数据. 这是我的代码,然后我使用

Hi all visitors i have problem with access. i try to display data from 3 tables in access. this is my code and then i use

dim s as string dim rd as DAO.recordset s="select T0.ID,T0.StudentID,T1.StudentName from Student T0 join Register T1 on T0.StudentID=T1.StudentID" set rd=currentDB.OpenRecordSet(s,dbOpenDynaset)

当我运行此代码时,它将出现错误运行时错误"3131"". 但这代码没问题

when i run this code, it will error "Run-time Error ''3131''". but this code is ok

dim s as string s="select T0.studentid,T0.studentname from student T0" set rd=currentDB.OpenRecordSet(s,dbOpenDynaset)

我很伤心,为什么我不能在Access女士中加入多个表? 谢谢

i wounder why i can''t join with multiple tables in Ms Access? Thanks

推荐答案

在此页面上,他们称其为INNER JOIN: office.microsoft/en-us/access-help/join-tables-and-queries-HA010096320.aspx [ ^ ]. 我仍然从MS Access中了解到的一点是,您可能必须通过AS引入table alias. 示例: It seems on this page they call it INNER JOIN: office.microsoft/en-us/access-help/join-tables-and-queries-HA010096320.aspx[^]. And the little I still know from MS Access is that you probably have to introduce the table alias via AS. Example: SELECT st.ID, st.StudentID, reg.StudentName FROM Student AS st INNER JOIN Register AS reg ON st.StudentID = reg.StudentID

干杯!

—MRB

Cheers!

—MRB

更多推荐

Access中的联接多表问题

本文发布于:2023-10-28 18:46:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1537464.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Access

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!