You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2019. It is now read-only.
Returns the defined length, in bytes, of a column.
35
+
This function returns the defined lengthof a column, in bytes.
36
36
37
37
[Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
Is the name of the table for which to determine column length information. *table* is an expression of type **nvarchar**.
47
+
The name of the table whose column length information we want to determine. *table* is an expression of type **nvarchar**.
48
48
49
49
**'***column***'**
50
-
Is the name of the column for which to determine length. *column* is an expression of type **nvarchar**.
50
+
The column name whose length we want to determine. *column* is an expression of type **nvarchar**.
51
51
52
52
## Return type
53
53
**smallint**
54
54
55
55
## Exceptions
56
-
Returns NULL on error or if a caller does not have permission to view the object.
56
+
Returns NULL on error, or if a caller does not have the correct permission to view the object.
57
57
58
-
In [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], a user can only view the metadata of securables that the user owns or on which the user has been granted permission. This means that metadata-emitting, built-in functions such as COL_LENGTH may return NULL if the user does not have any permission on the object. For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
58
+
In [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], a user can only view the metadata of securables that the user owns, or on which the user has been granted permission. This means that metadata-emitting, built-in functions such as COL_LENGTH might return NULL, if the user does not have correct permission on the object. See [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md) for more information.
59
59
60
60
## Remarks
61
-
For columns of type **varchar** declared with the **max** specifier (**varchar(max)**), COL_LENGTH returns the value –1.
61
+
For **varchar** columns declared with the **max** specifier (**varchar(max)**), COL_LENGTH returns the value –1.
62
62
63
63
## Examples
64
-
The following example shows the return values for a column of type `varchar(40)` and a column of type `nvarchar(40)`.
64
+
This example shows the return values for a column of type `varchar(40)` and a column of type `nvarchar(40)`:
0 commit comments