I am trying to drop user from role in several databases. It is not sure that user can be in same role in all the databases. How can i check if the user is in the role and if it is drop the user from the role.
e.g.
IF user exists in role
BEGIN
drop user from role
END
This is what i did: