AnsiNullsStatus 属性

获取 Boolean 属性值,该值指定是否对表启用 ISO NULL 处理。

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Design)> _
Public Property AnsiNullsStatus As Boolean
    Get
    Set
用法
Dim instance As Table
Dim value As Boolean

value = instance.AnsiNullsStatus

instance.AnsiNullsStatus = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)]
public bool AnsiNullsStatus { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::ReadOnlyAfterCreation|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase|SfcPropertyFlags::Design)]
public:
virtual property bool AnsiNullsStatus {
    bool get () sealed;
    void set (bool value) sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)>]
abstract AnsiNullsStatus : bool with get, set
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)>]
override AnsiNullsStatus : bool with get, set
final function get AnsiNullsStatus () : boolean
final function set AnsiNullsStatus (value : boolean)

属性值

类型:System. . :: . .Boolean
一个 Boolean 值,该值指定是否启用 ISO NULL 处理。
如果为 True,则与 Null 值之间的比较结果将等于 False。否则为 False(默认值)。

实现

ITableOptions. . :: . .AnsiNullsStatus

注释

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.

示例

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["AdventureWorks2008R2"];

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("AdventureWorks2008R2")

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