这不会显示结果
SELECT IMSLogin.AccountType, IMSLogin.Status, Registration.UsrFLname, Registration.UsrEmail, Employee.EMPID, Students.STUID, Employee.EMPDEPT, Franchise.FrArea, Franchise.FrName
FROM Registration
INNER JOIN IMSLogin ON Registration.RegId = IMSLogin.RegId
INNER JOIN Employee ON Registration.RegId = Employee.RegId
INNER JOIN Students ON Registration.RegId = Students.RegId
INNER JOIN Franchise ON Registration.RegId = Franchise.RegId
但如果我在下面给出,将给出正确的结果
SELECT Registration.UsrFLname, Registration.UsrEmail, Students.STUID, Students.Pay_type, IMSLogin.AccountType, IMSLogin.Status
FROM IMSLogin
INNER JOIN Registration ON IMSLogin.RegId = Registration.RegId
INNER JOIN Students ON Registration.RegId = Students.RegId
我的桌子:
Registration(RegId,PK)
IMSLogin(RegId, FK)
Students(RegId,FK)
Franchise(RegId,FK)
Employee(RegID,FK)
我试图在gridview中显示它,但我需要正确的查询,我不知道如何使用那个内部连接?
请帮忙....
谢谢...