The Edit and Modify commands might produce results that are different from the Script <object> as command for the same option setting. The Edit and Modify commands are designed to modify objects in the current database during a Query Editor session. The Script <object> as command is designed to generate a script so that it can be used later to create objects.
Specify scripting options by selecting from the available settings in the list to the right of each option.
General Scripting Options
Delimit individual statements
Separates individual Transact-SQL statements by using a batch separator. To change the default batch separator for Query Editor, select Tools/Options/Query Execution/SQL Server/General/Batch separator. Default is False. For more information, see GO (Transact-SQL).
Include descriptive headers
Adds descriptive comments to the script by separating the script into sections for each object. Default is True. For more information, see /*...*/ (Comment) (Transact-SQL).
Includes change tracking information in the script.
Script for server version
Creates a script that can be run on the selected version of SQL Server. Features that are new in SQL Server 2014 cannot be scripted for earlier versions. Some scripts that are created for SQL Server 2014 cannot be executed on servers that are running on an earlier version of SQL Server, or on a database that has an earlier database compatibility level setting.
Adds the USE DATABASE statement to the script to create database objects in the context of the current Object Explorer database. When the script is expected for use in a different database, select False to omit. Default is True. For more information, see USE (Transact-SQL).
Object Scripting Options
Generate script for dependent objects
Generates a script for additional objects that are required when the script for the selected object is executed. Default is False.
The following options apply only to scripts for tables or views.
Convert user-defined data types to base types
Converts user-defined data types to the base types from which they were created. Use True when the source database user-defined data types do not exist in the database where the script will be run. Use False to keep the user-defined data types. Default is False. For more information, see CREATE TYPE (Transact-SQL).
Generate SET ANSI PADDING commands
Adds the SET ANSI_PADDING statement before and after each CREATE TABLE statement. Default is True. For more information, see SET ANSI_PADDING (Transact-SQL).