...条sql语句怎样用内连接或者外连接实现,我是菜鸟,求指导!谢谢啦~很...
发布网友
发布时间:2024-09-25 15:34
我来回答
共3个回答
热心网友
时间:2024-11-20 23:30
string sql = "select Users.* ,Card.IsReportLost from Users,Card,Departments where Users.CardID = Card.CardID and Users.DeptID = Departments.ID";
select Users.*,Card.IsReportLost from Users join Card on Users.CardID = Card.CardID join Departments on Users.DeptID = Departments.ID
热心网友
时间:2024-11-20 23:33
string sql = "select Users.*,Card.IsReportLost from Users
left join Card on Users.CardID = Card.CardID
left join Departments on Users.DeptID = Departments.ID";
热心网友
时间:2024-11-20 23:28
select Users.* ,Card.IsReportLost from Users
left join Card on (Users.CardID = Card.CardID)
left join Departments on (Users.DeptID = Departments.ID)