问题描述
我必须在桌子上访问
表不,1内容
i have to table in access
table No,1 Content
Names , Students grade
qassem . 300
noor . 280
表不,2个内容
table No,2 content
schoolsName , Students grade
aaaaaaa . 290
bbbbbbb . 270
ccccccc . 250
i希望在C#2012视觉工作室中将这些表格链接到我们
当学生的最终成绩打开所有学校时
之后,每个学生按照给他的成绩打开他的选择
我无法链接到他们
谢谢
i am Egyptian
我的一些英语知识
i want to link those table with us in C# 2012 visual studio
When the students' final grades open them all schools
After that each student opens his choices by grade given to him
I can not link to them
thank you
i am Egyptian
A few my knowledge in English
推荐答案
ID ArtistName
1 Lana Del Ray
2 Coldplay
...
因为一个乐队或艺术家可能会产生多个曲目,所以将它们存储在自己的表中是有意义的 - 否则你将复制一个乐队名称,并且再一次。
和一张曲目表:
曲目:
Because a band or artist is likely to produce more than one track, it makes sense to store them in their own table - otherwise you will be duplicating teh smae band name over, and over again.
And a Tracks table:
Tracks:
ID ArtistID TrackName
1 1 Gods and Monsters
2 1 Ride
3 2 Paradise
4 2 Fix You
...
你可以在Tracks.ArtistID和Artists.ID列上的曲目和艺术家之间建立外键关系。
这可以让你获取相关信息:
And you can establish a foreign key relationship between the Tracks and Artists on the Tracks.ArtistID and Artists.ID columns.
That lets you fetch related information:
SELECT a.ArtistName, t.TrackName
FROM Tracks t
JOIN Artists a ON t.ArtistID=a.ID
然后返回:
And that returns you:
Gods and Monsters Lana Del Ray
Ride Lana Del Ray
Paradise Coldplay
Fix You Coldplay
...
但如果你没有连结专栏 ArtistsID然后没有办法连接两张桌子。
但是......在你的例子中,你不想要链接根本没有。
您要做的是检查每个学生成绩与学校将接受的最低价值,并显示学生可以去哪些学校。
那是只是一个简单的SQL查询:
But if you don't have the "linking column" of the ArtistsID then there isn't a way to "connect" the two tables.
But...in your example, you don't want a "link" at all.
What you want to do is check each student grade against the minimum value the schools will accept and show which schools the student can go to.
That's just a simple SQL query:
SELECT Students.StudentName, Schools.SchoolName FROM Students, Schools
WHERE Students.Grade >= Schools.MinGrade
这给出了你:
And that gives you:
StudentName SchoolName
qassem aaaaaaa
qassem bbbbbbb
qassem ccccccc
noor bbbbbbb
noor ccccccc
这篇关于我如何在表之间建立这种关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!