SSMS lo codifica de la siguiente manera:
Para SQL 2005/2008:
IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'username')
DROP USER [username]
Para SQL 2000:
IF EXISTS (SELECT * FROM dbo.sysusers WHERE name = N'username')
EXEC dbo.sp_revokedbaccess N'username'