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?有任何想法嗎?