1
BEGIN
2
DROP TEMPORARY TABLE IF EXISTS `TempUserLockout`;
3
CREATE TEMPORARY TABLE `TempUserLockout` SELECT uals.* FROM `userauthenticationlockoutstats` uals, `users` u WHERE uals.UserID = u.UserId;
4
TRUNCATE TABLE `userauthenticationlockoutstats`;
5
INSERT INTO `userauthenticationlockoutstats` SELECT * FROM `TempUserLockout`;
6
DROP TEMPORARY TABLE `TempUserLockout`;
7
END