Need a stored procedure that will check and then update the rows (with username & email) except the id (auto incremented with a unique one).
For example, if id = 5 has, the username abc and the email is def@ggg.com and the id is unique. Before it updates that row, it has to check the table to see if the username and email already exists. If anybody already has that username and email the table is not updated.
Please provide a stored procedure for this issue.

usernameandemail. – Remus Rusanu Jun 27 '12 at 6:17