Let's say I have two really simple tables like so

Users
-----
UserName
UserID

Payments
--------
UserID
PaymentAmount

Is there an easy way to do something like "delete all entries in the
payment table where the Username is 'John Smith'"

I'm thinking it would be trivial to do it with a subquery, but is
there a way to do it with an inner join (wouldn't that be faster).

Something like (it doesn't work):

DELETE FROM Payments INNER JOIN Users USING (UserID) WHERE UserName
= 'John Smith';

-- 
Scott Baker - Canby Telcom
RHCE - System Administrator - 503.266.8253

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to