DELETE from table

Local time
Today, 03:26
Joined
Mar 6, 2008
Messages
31
if I had tblOrders OrderNo, CustomerNo, Date, OrderTotal
tblCustomers CustomerNo, Name, Street, Country, Postcode

and I was asked to delete orders placed by customer Smith, would I be correct if I put this:

DELETE tblOrders*
FROM tblOrders INNER JOIN tblCustomers ON tblOrders.CustomerNo = tblCustomers.CustomerNo
WHERE Name = "Smith"


I wasnt sure about the DELETE tblOrders to have a '*' after it or not . .
 
Did you try it in the visual query designer?

You should probably put a "." between the table name and the "*".
 
this would delete all smith orders -- are you sure - might be better to delete by order no - and run a qry for smith and order numbers
 

Users who are viewing this thread

Back
Top Bottom