It appears that with non Azure SQL DBs you can right click the DB and then go to ‘Tasks’ to be able to script out your views. I don’t have that option with my Azure SQL. I can always script each one individually, however, was hoping for a quicker way to do it as I have 40-50 views.
2
Answers
The response by Dijkgraaf gives the definition of the view which will allow me to create a larger script to recreate my views. https://dataedo.com/kb/query/azure-sql/list-views-with-their-scripts
Does sp_helptext exist/work in Azure? If so, set SSMS to return results as text instead of table and execute:
It should return the create script. (Technically it returns a table with a single column named [Text] with a row for each line of the script.)
It works with views, stored procs, functions and triggers.