Class CompatibilitySchema.Comment
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.syscomments (Transact-SQL)
Applies to: √ SQL Server (all supported versions)
Contains entries for each view, rule, default, trigger, CHECK constraint, DEFAULT constraint, and stored procedure within the database. The text column contains the original SQL definition statements.
important
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. We recommend that you use sys.sql_modules instead. For more information, see sys.sql_modules (Transact-SQL).
See sys.syscomments.
[Table(Schema = "sys", Name = "syscomments", IsView = true)]
public class CompatibilitySchema.Comment
- Inheritance
-
CompatibilitySchema.Comment
- Extension Methods
Properties
CText
The raw bytes of the SQL definition statement.
[Column("ctext")]
[Nullable]
public byte[]? CText { get; set; }
Property Value
- byte[]
ColumnID
Row sequence number for object definitions that are longer than 4,000 characters.
[Column("colid")]
[NotNull]
public short ColumnID { get; set; }
Property Value
Compressed
Always returns 0. This indicates that the procedure is compressed.
[Column("compressed")]
[NotNull]
public bool Compressed { get; set; }
Property Value
Encrypted
Indicates whether the procedure definition is obfuscated.
0 = Not obfuscated
1 = Obfuscated
Important *</strong>* To obfuscate stored procedure definitions, use CREATE PROCEDURE with the ENCRYPTION keyword.
[Column("encrypted")]
[NotNull]
public bool Encrypted { get; set; }
Property Value
ID
Object ID to which this text applies.
[Column("id")]
[NotNull]
public int ID { get; set; }
Property Value
Language
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
[Column("language")]
[Nullable]
public short? Language { get; set; }
Property Value
Number
Number within procedure grouping, if grouped.
0 = Entries are not procedures.
[Column("number")]
[Nullable]
public short? Number { get; set; }
Property Value
Status
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
[Column("status")]
[NotNull]
public short Status { get; set; }
Property Value
Text
Actual text of the SQL definition statement.
The semantics of the decoded expression are equivalent to the original text; however, there are no syntactic guarantees. For example, white spaces are removed from the decoded expression.
This SQL Server 2000 (8.x)-compatible view obtains information from current SQL Server structures and can return more characters than the nvarchar(4000) definition. sp_help returns nvarchar(4000) as the data type of the text column. When working with syscomments consider using nvarchar(max). For new development work, do not use syscomments.
[Column("text")]
[Nullable]
public string? Text { get; set; }
Property Value
TextType
0 = User-supplied comment
1 = System-supplied comment
4 = Encrypted comment
[Column("texttype")]
[Nullable]
public short? TextType { get; set; }