TableViewTableTypeBase.Script Method (ScriptingOptions)


Generates a Transact-SQL script that can be used to re-create the database object with the specified scripting options.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public StringCollection Script(
	ScriptingOptions scriptingOptions


Type: Microsoft.SqlServer.Management.Smo.ScriptingOptions

A ScriptingOptions object that specifies the scripting options.

Return Value

Type: System.Collections.Specialized.StringCollection

The generated Transact-SQL script.

This method generates an exception if the scriptingOptions are set so that the entire dataset is scripted.

Return to top