Works On : 2K5 +
Script is simple and self explanatory. You can extend this script to grant/deny perms on other types of objects too , like select perms on tables , views etc. You can also add filters ( ex : WHERE o.[name] LIKE ''%example_%' ) etc to grant/permissions only on selected objects. This script is handy when you want to make permission for a user selective . I used this script when we revoked db_owner perms for some application users .