Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Table.AnsiNullsStatus Property

 

Applies To: SQL Server 2016 Preview

Gets the Boolean property value that specifies whether ISO NULL handling is enabled on the table.

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

[SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.ReadOnlyAfterCreation | SfcPropertyFlags.Standalone | SfcPropertyFlags.SqlAzureDatabase | SfcPropertyFlags.Design | SfcPropertyFlags.Matrix)]
public bool AnsiNullsStatus { get; set; }

Property Value

Type: System.Boolean

A Boolean value that specifies the whether the ISO NULL handing is enabled or not.

If True, comparisons to null values equate to False. Otherwise, False (default).

This property specifies whether any comparison to a null value equates to a NULL value. For, a SELECT statement that uses WHERE column_name <> NULL returns zero rows even if there are non-null values in column_name.

Legacy Code Example

The following code example shows how to declare a new table on the specified database, with the specified name.

C#

Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2012"];

Table tb = new Table(db, "Test Table");
tb.AnsiNullsStatus = true;

Powershell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2012")

#Define the Table
$tb = new-object Microsoft.SqlServer.Management.Smo.Table($db, "Test Table")
$tb.AnsiNullsStatus = $TRUE

Return to top
Show:
© 2015 Microsoft