Dieser Artikel wurde noch nicht bewertet - Dieses Thema bewerten.

Column-Klasse

The Column object represents a SQL Server column.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
public sealed class Column : ScriptNameObjectBase, 
	ISfcSupportsDesignMode, ICreatable, IAlterable, IDroppable, IMarkForDrop, 
	IExtendedProperties, IRenamable

Der Column-Typ macht folgende Elemente verfügbar.

  NameBeschreibung
Öffentliche MethodeColumn()Initializes a new instance of the Column class.
Öffentliche MethodeColumn(SqlSmoObject, String)Initializes a new instance of the Column class that has the specified parent and specified name.
Öffentliche MethodeColumn(SqlSmoObject, String, DataType)Initializes a new instance of the Column class that has the specified parent and specified name.
Öffentliche MethodeColumn(SqlSmoObject, String, DataType, Boolean)Initializes a new instance of the Column class that uses the specified parent, datayype, and optionally adding the FILESTREAM attribute.
Zum Anfang
  NameBeschreibung
Öffentliche EigenschaftAnsiPaddingStatusGets a Boolean property value that specifies whether the ANSI_PADDING_ENABLED column option is active.
Öffentliche EigenschaftCollationGets or sets the default collation that is used by the column.
Öffentliche EigenschaftComputedGets the Boolean property value that specifies whether the column is the product of computed expression
Öffentliche EigenschaftComputedTextGets or sets the Transact-SQL expression that is used to generate the value of a computed column
Öffentliche EigenschaftDataTypeGets or sets the data type that is assigned to the column.
Öffentliche EigenschaftDefaultGets or sets the default bound to the column.
Öffentliche EigenschaftDefaultConstraintGets a default value for the column.
Öffentliche EigenschaftDefaultSchemaGets or sets the default schema that is bound to the column.
Öffentliche EigenschaftExtendedPropertiesRepresents a collection of ExtendedProperty objects. Each ExtendedProperty object represents an extended property for the Column object.
Öffentliche EigenschaftIDGets the column ID that uniquely identifies the column.
Öffentliche EigenschaftIdentityGets or sets the Boolean property value that specifies whether the column is an identity column.
Öffentliche EigenschaftIdentityIncrementGets or sets the identity increment for an identity column.
Öffentliche EigenschaftIdentitySeedGets or sets the identity seed for an identity column.
Öffentliche EigenschaftInPrimaryKeyGets the Boolean property value that specifies whether the column is included in the definition of a primary key or unique key constraint.
Öffentliche EigenschaftIsColumnSetGets or sets a Boolean value that specifies whether the column is a sparse column that is a member of a column set.
Öffentliche EigenschaftIsDeterministicGets or sets the Boolean property value that specifies whether the value of a computed column can change in subsequent invocations.
Öffentliche EigenschaftIsFileStreamGets a boolean value that represents the FILESTREAM attribute of the column.
Öffentliche EigenschaftIsForeignKeyGets the Boolean property value that specifies whether the column is a foreign key.
Öffentliche EigenschaftIsFullTextIndexedGets the Boolean property value that specifies whether the column participates in a full-text index.
Öffentliche EigenschaftIsPersistedGets the Boolean property value that specifies whether the computed value of the Column object is saved with the data, thus avoiding a computation each time the column is accessed.
Öffentliche EigenschaftIsPreciseGets or sets the Boolean property value that specifies whether a computed column is a precise value.
Öffentliche EigenschaftIsSparseGets or sets the Boolean property value that specifies whether this is a sparse column. For more information about sparse columns, see Verwenden von Spalten mit geringer Dichte.
Öffentliche EigenschaftNameGets or sets a String value that specifies the name of the column. (Überschreibt NamedSmoObject.Name.)
Öffentliche EigenschaftNotForReplicationGets the Boolean property value that specifies whether the column is participating in replication.
Öffentliche EigenschaftNullableGets or sets the Boolean property value that specifies whether the column can accept null values.
Öffentliche EigenschaftParentGets the SqlSmoObject object that is the parent of the Column object.
Öffentliche EigenschaftPropertiesGets a collection of Property objects that represent the object properties. (Geerbt von SqlSmoObject.)
Öffentliche EigenschaftRowGuidColGets or sets the Boolean property value that specifies whether the column is automatically updated with a unique GUID value.
Öffentliche EigenschaftRuleGets or sets the rule that is bound to the column.
Öffentliche EigenschaftRuleSchemaGets or sets the rule schema that is bound to the column.
Öffentliche EigenschaftStateGets the state of the referenced object. (Geerbt von SmoObjectBase.)
Öffentliche EigenschaftStatisticalSemanticsGets or sets a value to indicate whether a column has been enabled for Semantic Extraction and Indexing.
Öffentliche EigenschaftUrnGets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Geerbt von SqlSmoObject.)
Öffentliche EigenschaftUserDataGets or sets user-defined data associated with the referenced object. (Geerbt von SmoObjectBase.)
Zum Anfang
  NameBeschreibung
Öffentliche MethodeAddDefaultConstraint()Adds a default constraint to the column.
Öffentliche MethodeAddDefaultConstraint(String)Adds a default constraint to the column.
Öffentliche MethodeAlterUpdates any Column object property changes on the instance of SQL Server.
Öffentliche MethodeBindDefaultBinds a default to the column.
Öffentliche MethodeBindRuleBinds a rule to the column.
Öffentliche MethodeCreateCreates a column on the instance of Microsoft SQL Server as defined by the Column object.
Öffentliche MethodeDiscoverDiscovers a list of type Object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeDropDrops the column.
Öffentliche MethodeEnumForeignKeysEnumerates a list of foreign keys that reference the column.
Öffentliche MethodeEnumIndexesEnumerates a list of indexes that include the column.
Öffentliche MethodeEnumUserPermissionsEnumerates a list of permissions for a specified user.
Öffentliche MethodeEquals (Geerbt von Object.)
Geschützte MethodeFormatSqlVariantFormats an object as SqlVariant type. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetContextDBGets the context database that is associated with this object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetDBNameGets the database name that is associated with the object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeGetHashCode (Geerbt von Object.)
Geschützte MethodeGetPropValueGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetPropValueOptionalGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetPropValueOptionalAllowNullGets a property value of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Geschützte MethodeGetServerObjectGets the server of the SqlSmoObject object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeGetType (Geerbt von Object.)
Öffentliche MethodeInitialize()Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Öffentliche MethodeInitialize(Boolean)Initializes the object and forces the properties be loaded. (Geerbt von SqlSmoObject.)
Geschützte MethodeIsObjectInitializedVerifies whether the object has been initialized. (Geerbt von SqlSmoObject.)
Geschützte MethodeIsObjectInSpaceVerifies whether the object is isolated or connected to the instance of SQL Server. (Geerbt von SqlSmoObject.)
Öffentliche MethodeMarkForDropMarks the column to be dropped when the Alter method is run on the column's parent Table object.
Öffentliche MethodeRefreshRefreshes the Column object properties. (Überschreibt ScriptNameObjectBase.Refresh().)
Öffentliche MethodeRenameRenames the column.
Geschützte MethodeSetParentImplSets the parent of the SqlSmoObject to the newParent parameter. (Geerbt von SqlSmoObject.)
Öffentliche MethodeToStringReturns a String that represents the referenced object. (Geerbt von SqlSmoObject.)
Öffentliche MethodeUnbindDefaultUnbinds the currently bound default from the column.
Öffentliche MethodeUnbindRuleUnbinds the currently bound rule from the column.
Öffentliche MethodeUpdateStatistics()Updates Statistic objects that monitor this column.
Öffentliche MethodeUpdateStatistics(StatisticsScanType)Updates Statistic objects that monitor this column.
Öffentliche MethodeUpdateStatistics(StatisticsScanType, Int32)Updates Statistic objects that monitor this column using a sampled scan.
Öffentliche MethodeUpdateStatistics(StatisticsScanType, Int32, Boolean)Updates Statistic objects that monitor this column using a sampled scan.
Öffentliche MethodeValidateValidates the state of an object. (Geerbt von SmoObjectBase.)
Zum Anfang
  NameBeschreibung
Öffentliches EreignisPropertyChangedRepresents the event that occurs when a property is changed. (Geerbt von SqlSmoObject.)
Öffentliches EreignisPropertyMetadataChangedRepresents the event that occurs when property metadata changes. (Geerbt von SqlSmoObject.)
Zum Anfang
  NameBeschreibung
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.DiscoverDiscovers any dependencies. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetDomainRootReturns the root of the domain. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetParentGets the parent of this object. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetPropertyTypeGets the type of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetPropertyValueGets the value of the specified property. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.GetUrnGets the Unified Resource Name (URN) of the object. Verweisen Sie nicht direkt im Code auf dieses Element. Unterstützt die SQL Server-Infrastruktur. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.ResolveGets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.SetObjectStateSets the object state to the specified SfcObjectState value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeIAlienObject.SetPropertyValueSets the property value. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate MethodeISfcPropertyProvider.GetPropertySetGets the interface reference to the set of properties of this object. (Geerbt von SqlSmoObject.)
Explizite SchnittstellenimplementierungPrivate EigenschaftISfcSupportsDesignMode.IsDesignModeGets a Boolean value that specifies whether the column supports design mode.
Zum Anfang

To get Column object properties, users can be a member of the public fixed server role.

To do any of the following, users must have ALTER permission on the parent table, or be a member of the db_owner fixed database role:

  • Set Column object properties and run the Alter method

  • Create a column

  • Drop a column

Thread Safety

Alle öffentlichen, statischen Elemente dieses Typs (Shared in Microsoft Visual Basic) sind für Vorgänge mit mehreren Threads sicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.
Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)

Community-Beiträge

HINZUFÜGEN
© 2013 Microsoft. Alle Rechte vorbehalten.