SSMS lo script nel modo seguente:
Per SQL 2005/2008:
IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'username')
DROP USER [username]
Per SQL 2000:
IF EXISTS (SELECT * FROM dbo.sysusers WHERE name = N'username')
EXEC dbo.sp_revokedbaccess N'username'