MySQL Forums
Forum List  »  Quality Assurance

Re: HELP, QUERY PROBLEMS
Posted by: bruno rossi
Date: January 10, 2008 02:29AM

1250 MSM 2007-10-11 OK 128.50 130332 63 2
1251 MSM 2007-10-12 OK 128.50 130332 63 2

DELETE FROM TABLE WHERE Annual = 128.50, AssignmentID = 130332, RiskID = 63, Rank = 2 LIMIT 1;

U can use ORDER BY to delete 1250 or 1251:

DELETE FROM TABLE WHERE Annual = 128.50, AssignmentID = 130332, RiskID = 63, Rank = 2 ORDER BY resultID LIMIT 1;
1250 will be deleted

DELETE FROM TABLE WHERE Annual = 128.50, AssignmentID = 130332, RiskID = 63, Rank = 2 ORDER BY resultID DESC LIMIT 1;
1251 will be deleted

Ciao

Options: ReplyQuote


Subject
Views
Written By
Posted
3139
December 10, 2007 09:35AM
2188
December 12, 2007 08:13AM
Re: HELP, QUERY PROBLEMS
2178
January 10, 2008 02:29AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.