关系代数中的表连接,具有相同名称的属性会发生什么?

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

the database

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

也许两者都被保留,您可以通过 Employee.Name 或 Customer.Name 访问它们。

database relational-algebra
1个回答
-1
投票

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

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.