Any suggestions? Export (0) Print
Expand All

Column Class

 

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

NameDescription
System_CAPS_pubmethodColumn()

Initializes a new instance of the Column class.

System_CAPS_pubmethodColumn(SqlSmoObject, String)

Initializes a new instance of the Column class that has the specified parent and specified name.

System_CAPS_pubmethodColumn(SqlSmoObject, String, DataType)

Initializes a new instance of the Column class that has the specified parent and specified name.

System_CAPS_pubmethodColumn(SqlSmoObject, String, DataType, Boolean)

Initializes a new instance of the Column class that uses the specified parent, datayype, and optionally adding the FILESTREAM attribute.

NameDescription
System_CAPS_pubpropertyAnsiPaddingStatus

Gets a Boolean property value that specifies whether the ANSI_PADDING_ENABLED column option is active.

System_CAPS_pubpropertyCollation

Gets or sets the default collation that is used by the column.

System_CAPS_pubpropertyComputed

Gets the Boolean property value that specifies whether the column is the product of computed expression

System_CAPS_pubpropertyComputedText

Gets or sets the Transact-SQL expression that is used to generate the value of a computed column

System_CAPS_pubpropertyDataType

Gets or sets the data type that is assigned to the column.

System_CAPS_pubpropertyDefault

Gets or sets the default bound to the column.

System_CAPS_pubpropertyDefaultConstraint

Gets a default value for the column.

System_CAPS_pubpropertyDefaultSchema

Gets or sets the default schema that is bound to the column.

System_CAPS_pubpropertyExtendedProperties

Represents a collection of ExtendedProperty objects. Each ExtendedProperty object represents an extended property for the Column object.

System_CAPS_pubpropertyID

Gets the column ID that uniquely identifies the column.

System_CAPS_pubpropertyIdentity

Gets or sets the Boolean property value that specifies whether the column is an identity column.

System_CAPS_pubpropertyIdentityIncrement

Gets or sets the identity increment for an identity column.

System_CAPS_pubpropertyIdentitySeed

Gets or sets the identity seed for an identity column.

System_CAPS_pubpropertyInPrimaryKey

Gets the Boolean property value that specifies whether the column is included in the definition of a primary key or unique key constraint.

System_CAPS_pubpropertyIsColumnSet

Gets or sets a Boolean value that specifies whether the column is a sparse column that is a member of a column set.

System_CAPS_pubpropertyIsDeterministic

Gets or sets the Boolean property value that specifies whether the value of a computed column can change in subsequent invocations.

System_CAPS_pubpropertyIsFileStream

Gets a T:System.boolean value that represents the FILESTREAM attribute of the column.

System_CAPS_pubpropertyIsForeignKey

Gets the Boolean property value that specifies whether the column is a foreign key.

System_CAPS_pubpropertyIsFullTextIndexed

Gets the Boolean property value that specifies whether the column participates in a full-text index.

System_CAPS_pubpropertyIsPersisted

Gets 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.

System_CAPS_pubpropertyIsPrecise

Gets or sets the Boolean property value that specifies whether a computed column is a precise value.

System_CAPS_pubpropertyIsSparse

Gets or sets the Boolean property value that specifies whether this is a sparse column. For more information about sparse columns, see Use Sparse Columns.

System_CAPS_pubpropertyName

Gets or sets a String value that specifies the name of the column.(Overrides NamedSmoObject.Name.)

System_CAPS_pubpropertyNotForReplication

Gets the Boolean property value that specifies whether the column is participating in replication.

System_CAPS_pubpropertyNullable

Gets or sets the Boolean property value that specifies whether the column can accept null values.

System_CAPS_pubpropertyParent

Gets the SqlSmoObject object that is the parent of the Column object.

System_CAPS_pubpropertyProperties

Gets a collection of Property objects that represent the object properties.(Inherited from SqlSmoObject.)

System_CAPS_pubpropertyRowGuidCol

Gets or sets the Boolean property value that specifies whether the column is automatically updated with a unique GUID value.

System_CAPS_pubpropertyRule

Gets or sets the rule that is bound to the column.

System_CAPS_pubpropertyRuleSchema

Gets or sets the rule schema that is bound to the column.

System_CAPS_pubpropertyState

Gets the state of the referenced object.(Inherited from SmoObjectBase.)

System_CAPS_pubpropertyStatisticalSemantics

Gets or sets a value to indicate whether a column has been enabled for Semantic Extraction and Indexing.

System_CAPS_pubpropertyUrn

Gets the Uniform Resource Name (URN) address value that uniquely identifies the object.(Inherited from SqlSmoObject.)

System_CAPS_pubpropertyUserData

Gets or sets user-defined data associated with the referenced object.(Inherited from SmoObjectBase.)

NameDescription
System_CAPS_pubmethodAddDefaultConstraint()

Adds a default constraint to the column.

System_CAPS_pubmethodAddDefaultConstraint(String)

Adds a default constraint to the column.

System_CAPS_pubmethodAlter()

Updates any Column object property changes on the instance of SQL Server.

System_CAPS_pubmethodBindDefault(String, String)

Binds a default to the column.

System_CAPS_pubmethodBindRule(String, String)

Binds a rule to the column.

System_CAPS_pubmethodCreate()

Creates a column on the instance of Microsoft SQL Server as defined by the Column object.

System_CAPS_pubmethodDiscover()

Discovers a list of type Object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodDrop()

Drops the column.

System_CAPS_pubmethodEnumForeignKeys()

Enumerates a list of foreign keys that reference the column.

System_CAPS_pubmethodEnumIndexes()

Enumerates a list of indexes that include the column.

System_CAPS_pubmethodEnumUserPermissions(String)

Enumerates a list of permissions for a specified user.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFormatSqlVariant(Object)

Formats an object as T: Microsoft.Data.Schema.Sql.DataGenerator.SqlVariant type.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetContextDB()

Gets the context database that is associated with this object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetDBName()

Gets the database name that is associated with the object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodGetPropValue(String)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetPropValueOptional(String)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetPropValueOptionalAllowNull(String)

Gets a property value of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_protmethodGetServerObject()

Gets the server of the SqlSmoObject object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitialize()

Initializes the object and forces the properties be loaded.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodInitialize(Boolean)

Initializes the object and forces the properties be loaded.(Inherited from SqlSmoObject.)

System_CAPS_protmethodIsObjectInitialized()

Verifies whether the object has been initialized.(Inherited from SqlSmoObject.)

System_CAPS_protmethodIsObjectInSpace()

Verifies whether the object is isolated or connected to the instance of SQL Server.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodMarkForDrop(Boolean)

Marks the column to be dropped when the Alter method is run on the column's parent Table object.

System_CAPS_pubmethodRefresh()

Refreshes the Column object properties.(Overrides ScriptNameObjectBase.Refresh().)

System_CAPS_pubmethodRename(String)

Renames the column.

System_CAPS_protmethodSetParentImpl(SqlSmoObject)

Sets the parent of the SqlSmoObject to the newParent parameter.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodToString()

Returns a String that represents the referenced object.(Inherited from SqlSmoObject.)

System_CAPS_pubmethodUnbindDefault()

Unbinds the currently bound default from the column.

System_CAPS_pubmethodUnbindRule()

Unbinds the currently bound rule from the column.

System_CAPS_pubmethodUpdateStatistics()

Updates Statistic objects that monitor this column.

System_CAPS_pubmethodUpdateStatistics(StatisticsScanType)

Updates Statistic objects that monitor this column.

System_CAPS_pubmethodUpdateStatistics(StatisticsScanType, Int32)

Updates Statistic objects that monitor this column using a sampled scan.

System_CAPS_pubmethodUpdateStatistics(StatisticsScanType, Int32, Boolean)

Updates Statistic objects that monitor this column using a sampled scan.

System_CAPS_pubmethodValidate(String, Object[])

Validates the state of an object.(Inherited from SmoObjectBase.)

NameDescription
System_CAPS_pubeventPropertyChanged

Represents the event that occurs when a property is changed.(Inherited from SqlSmoObject.)

System_CAPS_pubeventPropertyMetadataChanged

Represents the event that occurs when property metadata changes.(Inherited from SqlSmoObject.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.Discover()

Discovers any dependencies.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetDomainRoot()

Returns the root of the domain.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetParent()

Gets the parent of this object. Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetPropertyType(String)

Gets the type of the specified property.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetPropertyValue(String, Type)

Gets the value of the specified property.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.GetUrn()

Gets the Unified Resource Name (URN) of the object.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.Resolve(String)

Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.SetObjectState(SfcObjectState)

Sets the object state to the specified SfcObjectState value.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAlienObject.SetPropertyValue(String, Type, Object)

Sets the property value.(Inherited from SqlSmoObject.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodISfcPropertyProvider.GetPropertySet()

Gets the interface reference to the set of properties of this object.

Do not reference this member directly in your code. It supports the SQL Server infrastructure.(Inherited from SqlSmoObject.)

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

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft