Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete query

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
From my query, enumerated below,i want to delete the productId = 2 from orderid = 4.I want to build a delete query in sql view. and later on give the command run sql.How can i do that ?

SELECT orders.orderid, products.Productid FROM products INNER JOIN (orders INNER JOIN [order details] ON orders.orderid = [order details].OrderID) ON products.Productid = [order details].ProductID;
 
DELETE *
FROM [order details]
WHERE orderid = 4 AND Productid = 2

I guess that the products requested in an order are kept on the order details table!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top