Assume that the tables in a database are changed in a way that would affect the definition of any views that are created on it. To help solve this, you will need to refresh the views in the database.
If you have a requirement to refresh all the views in a database, use the script. Change the database name at the top with your required database name and run the script. It should work.
Also if you have any requirement to refresh all views in all the databases, then use a cursor and run through the script. Fairly simple!!!