SSMS го скриптира по следния начин:
За SQL 2005/2008:
IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'username')
DROP USER [username]
За SQL 2000:
IF EXISTS (SELECT * FROM dbo.sysusers WHERE name = N'username')
EXEC dbo.sp_revokedbaccess N'username'