SELECT *
FROM A LEFT OUTER JOIN
B ON A.ID = B.ID
WHERE B.ID IS NULL
开发实例:
SELECT Position_Car.Area, Position_Car.CarMapNum, Position_Car.CheweiID, Position_Car.CarlotName,
Position_Car.Points
FROM Position_Car LEFT OUTER JOIN
TRelation_Equipment_Position ON TRelation_Equipment_Position.CheWeiID = Position_Car.CheweiID
WHERE (Position_Car.CarMapNum = @CarMapNum) AND (TRelation_Equipment_Position.CheWeiID IS NULL)