
SET @NAME=1341;

USE mitsql;
DELETE FROM DBQuota WHERE DatabaseId IN (SELECT DatabaseId FROM DBOwner WHERE UserId = @NAME);
DELETE FROM DB WHERE DatabaseId IN (SELECT DatabaseId FROM DBOwner WHERE UserId = @NAME);
DELETE FROM DBOwner WHERE UserId = @NAME;
DELETE FROM UserGroup WHERE UserId = @NAME;
DELETE FROM UserQuota WHERE UserId = @NAME;
DELETE FROM UserStat WHERE UserId = @NAME;
DELETE FROM `User` WHERE UserId = @NAME;

ALTER TABLE `User` AUTO_INCREMENT =1340;
