Table of Contents

Class InformationSchema.TableConstraint

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

TABLE_CONSTRAINTS (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Returns one row for each table constraint in the current database. This information schema view returns information about the objects to which the current user has permissions.
To retrieve information from these views, specify the fully qualified name of INFORMATION_SCHEMA._view_name_.


See INFORMATION_SCHEMA.TABLE_CONSTRAINTS.

[Table(Schema = "INFORMATION_SCHEMA", Name = "TABLE_CONSTRAINTS", IsView = true)]
public class InformationSchema.TableConstraint
Inheritance
InformationSchema.TableConstraint
Extension Methods

Properties

ConstraintCatalog

Constraint qualifier.

[Column("CONSTRAINT_CATALOG")]
[Nullable]
public string? ConstraintCatalog { get; set; }

Property Value

string

ConstraintName

Constraint name.

[Column("CONSTRAINT_NAME")]
[NotNull]
public string ConstraintName { get; set; }

Property Value

string

ConstraintSchema

Name of schema that contains the constraint.

Important only reliable way to find the schema of a object is to query the sys.objects catalog view.

[Column("CONSTRAINT_SCHEMA")]
[Nullable]
public string? ConstraintSchema { get; set; }

Property Value

string

ConstraintType

Type of constraint:

CHECK

UNIQUE

PRIMARY KEY

FOREIGN KEY

[Column("CONSTRAINT_TYPE")]
[Nullable]
public string? ConstraintType { get; set; }

Property Value

string

InitiallyDeferred

Specifies whether constraint checking is at first deferred. Always returns NO.

[Column("INITIALLY_DEFERRED")]
[NotNull]
public string InitiallyDeferred { get; set; }

Property Value

string

IsDeferrable

Specifies whether constraint checking is deferrable. Always returns NO.

[Column("IS_DEFERRABLE")]
[NotNull]
public string IsDeferrable { get; set; }

Property Value

string

TableCatalog

Table qualifier.

[Column("TABLE_CATALOG")]
[Nullable]
public string? TableCatalog { get; set; }

Property Value

string

TableName

Table name.

[Column("TABLE_NAME")]
[Nullable]
public string? TableName { get; set; }

Property Value

string

TableSchema

Name of schema that contains the table.

Important only reliable way to find the schema of a object is to query the sys.objects catalog view.

[Column("TABLE_SCHEMA")]
[Nullable]
public string? TableSchema { get; set; }

Property Value

string