Right click the database itself, Tasks -> Generate Scripts…
Then follow the wizard.
For SSMS2008+, if you want to also export the data, on the “Set Scripting Options” step, select the “Advanced” button and change “Types of data to script” from “Schema Only” to “Data Only” or “Schema and Data”.
More Related Contents:
- What is the use of GO in SQL Server Management Studio & Transact SQL?
- What is the best way to auto-generate INSERT statements for a SQL Server table?
- How to see query history in SQL Server Management Studio
- Pass Dictionary to Stored Procedure T-SQL
- How do you view ALL text from an ntext or nvarchar(max) in SSMS?
- sql server invalid object name – but tables are listed in SSMS tables list
- Import Multiple CSV Files to SQL Server from a Folder
- SSMS Results to Grid – CRLF not preserved in copy/paste – any better techniques?
- Import Excel spreadsheet columns into SQL Server database
- How do I view the full content of a text or varchar(MAX) column in SQL Server 2008 Management Studio?
- How can I automate the “generate scripts” task in SQL Server Management Studio 2008?
- Query times out when executed from web, but super-fast when executed from SSMS
- How do you specify a different port number in SQL Management Studio?
- Unique constraint on multiple columns
- SQL Server BCP export corrupted file?
- How can I import an Excel file into SQL Server? [closed]
- Format SQL in SQL Server Management Studio
- Removing the remembered login and password list in SQL Server Management Studio
- SQL Server (localdb)\v11.0 explained
- The request failed or the service did not respond in a timely fashion?
- FOR JSON PATH results in SSMS truncated to 2033 characters
- SQL Server 2008 can’t login with newly created user
- Auto increment primary key in SQL Server Management Studio 2012
- SQL Server Linked Server Example Query
- Infinite loop CTE with OPTION (maxrecursion 0)
- PIVOT in sql 2005
- Atomic UPSERT in SQL Server 2005
- What is the Oracle equivalent of SQL Server’s IsNull() function?
- SQL Recursive CTE: Finding objects linked by property
- SQL Client for Mac OS X that works with MS SQL Server [closed]