更新时间:2023-01-20 08:08:55
两个表都包含列tID
.为了编译VIEW
,您需要在该列上创建一个别名,或仅指定一个tid
和一个表,该别名将来自何处.
The two tables contains columns tID
. In order to compile the VIEW
, you need to create an alias on that column or just specify one tid
and table where it will come from.
一种解决方案:
SELECT h.TID, -- and not specifying b.TID
FROM tab1 h LEFT JOIN tab2 b ON h.tID=b.tID
另一种解决方案:提供别名
Another solution: supply an alias,
SELECT h.TID as H_TID,
b.TID as B_TID
FROM tab1 h LEFT JOIN tab2 b ON h.tID=b.tID