关系代数 - 连接

问题描述 投票:0回答:1

嗨,所以我有一个概念上的误解:This is the database I am working with

我正在尝试连接 Employee 和 Customer 表,但是某些具有相同名称的属性会发生什么情况,因为它们存储的数据不相同?

我希望两者都保留,并且您可以通过 Employee.Name 或 Customer.Name 访问它们,但我不确定。

database relational-algebra
1个回答
0
投票

你是对的,你可以这样使用它:

SELECT 
e.Name, -- name of the employee 
c.Name  -- name of the customer 
FROM Employee as e JOIN Customer as c ON e.EmployeeId = c.SupportRepId
© www.soinside.com 2019 - 2024. All rights reserved.