Executing the procedure with parameters @DBNAME = 'database_name' , @USERS = ' list_users' and @EXCEPT = '' deletes the specified users given in the @USERS parameter.

Example:

EXEC REMOVE_USERS_2000_and_2005 @DBNAME ='Products', @USER = 'user_cmd,cris,lex', @EXCEPT = ''
GO


Results:



Note: The @EXCEPT parameter must be used only with @USER = 'ALL'