ADMIN_GetTableCreateScript

 Show all Hide all

Deprecated.

Returns a script that when run will recreate the source table under an optionally different name. There is also an option to force all columns (except those included in the primary key) to be defined as nullable.

Note on indexes:
Currently only the primary key index is included. All other indexes that the source table may have will be omitted.

Type: Scalar function
Area of use: General use

Return value: varchar(max)

The generated table create script.

Parameters:

@SourceTableName mandatory varchar(300)
The table to use as a source for the create script.
@NewTableName optional varchar(300)
The table name that will be used in the create script. Set to null or DEFAULT to use the source table name.
@ForceNullability optional bit
Use this to force all columns (except those included in the primary key) to be defined as nullable in the create script.
@ExcludeComputedColumns optional bit
Use this to exclude computed columns from being included in the created script.