0
我试着从具有相同的列2个表中选择,但两个表有一个内部联接 -SQL UNION INNER JOIN
select e.ID,
c.FullName,
car.VIN,
car.Registration,
e.Telephone,
e.Mobile,
e.Email,
e.EstimateTotal,
e.LastUpdated,
e.LastUpdateBy from (select id from Estimates UNION ALL select id from PrivateEstimates) e
inner join Customers c on c.ID = e.CustomerID
inner join Cars car on car.ID = e.CarID
where e.Status = 0
麻烦的是,它无法找到e.CustomerID,E。内部连接上的CarID或e.Status?有任何想法吗?