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
This function returns the name of a table column, based on the table identification number and column identification number values of that table column.
The identification number of the table containing that column. The *table_id* argument has an **int** data type.
38
-
39
-
*column_id*
42
+
43
+
#### *column_id*
44
+
40
45
The identification number of the column. The *column_id* argument has an **int** data type.
41
-
46
+
42
47
## Return types
48
+
43
49
**sysname**
44
-
45
-
## Exceptions
46
-
Returns NULL on error, or if a caller does not have the correct permission to view the object.
47
-
48
-
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_NAME` might return NULL, if the user does not have correct permissions on the object. See [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md) for more information.
49
-
50
-
## Remarks
50
+
51
+
## Exceptions
52
+
53
+
Returns `NULL` on error, or if a caller doesn't have the correct permission to view the object.
54
+
55
+
A user can only view the metadata of securables that the user owns, or on which the user is granted permission. This means that metadata-emitting, built-in functions such as `COL_NAME` might return `NULL`, if the user doesn't have correct permissions on the object. For more information, see [Metadata visibility configuration](../../relational-databases/security/metadata-visibility-configuration.md).
56
+
57
+
## Remarks
58
+
51
59
The *table_id* and *column_id* parameters together produce a column name string.
52
-
53
-
See [OBJECT_ID (Transact-SQL)](../../t-sql/functions/object-id-transact-sql.md) for more information about obtaining table and column identification numbers.
54
-
55
-
## Examples
56
-
This example returns the name of the first column in a sample `Employee` table.
57
-
60
+
61
+
For more information about obtaining table and column identification numbers, see [OBJECT_ID](object-id-transact-sql.md).
0 commit comments