Share via


AnsiNullsStatus Propiedad

Obtiene el valor de propiedad Boolean que especifica si está habilitado el control de valores NULL ISO en la tabla.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Design)> _
Public Property AnsiNullsStatus As Boolean
    Get
    Set
'Uso
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)

Valor de la propiedad

Tipo: System. . :: . .Boolean
Valor Boolean que especifica si el control de valores NULL ISO está habilitado o no.
Si es True, las comparaciones con valores NULL son igual a False. En caso contrario, es False (valor predeterminado).

Implementa

ITableOptions. . :: . .AnsiNullsStatus

Comentarios

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.

Ejemplos

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