Script Multiple SQL Server Database Objects in SSMS

In SQL Server Management Studio (SSMS) Object Explorer (it can be open using F8 key), you can only script a single object.
To create a script, right click on the object name (for example table name) and choose 'Script Table as':

script_single_table_object_explorer

To script multiple objects you need to use Object Explorer Details page (it can be open using F7 key).
In Object Explorer Details, select multiple objects by holding Ctrl key and left click objects you want to include in selection.
Right click on any of the selected object (in this example tables) and choose 'Script Table as':

script_multiple_table_object_explorer_details

If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">