I've been trying to delete the the same highest value from multiple tables, however I get a syntax error on t1 and t3. Any ideas how to fix it? Btw I'm using MS SQL (TSQL)
DELETE FROM ProductsOrders t1, Orders t2
JOIN ( SELECT MAX(OrderID) FROM Orders) t3
WHERE t1.OrderID = t3.OrderID
AND t2.OrderID = t3.OrderID