ROUTINE_COLUMNS (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Returns one row for each column returned by the table-valued functions that can be accessed by the current user in the current database.

To retrieve information from this view, specify the fully qualified name of INFORMATION_SCHEMA.view_name.

Column nameData typeDescription
TABLE_CATALOGnvarchar(128)Catalog or database name of the table-valued function.
TABLE_SCHEMAnvarchar(128)Name of the schema that contains the table-valued function.

 ** Important ** Do not use INFORMATION_SCHEMA views to determine the schema of an object. The only reliable way to find the schema of a object is to query the sys.objects catalog view.
TABLE_NAMEnvarchar(128)Name of the table-valued function.
COLUMN_NAMEnvarchar(128)Column name.
ORDINAL_POSITIONintColumn identification number.
COLUMN_DEFAULTnvarchar(4000)Default value of the column.
IS_NULLABLEvarchar(3)If this column allows for NULL, returns YES. Otherwise, returns NO.
DATA_TYPEnvarchar(128)System-supplied data type.
CHARACTER_MAXIMUM_LENGTHintMaximum length, in characters, for binary data, character data, or text and image data.

-1 for xml and large-value type data. Otherwise, returns NULL. For more information, see Data Types (Transact-SQL).
CHARACTER_OCTET_LENGTHintMaximum length, in bytes, for binary data, character data, or text and image data.

-1 for xml and large-value type data. Otherwise, returns NULL.
NUMERIC_PRECISIONtinyintPrecision of approximate numeric data, exact numeric data, integer data, or monetary data. Otherwise, returns NULL.
NUMERIC_PRECISION_RADIXsmallintPrecision radix of approximate numeric data, exact numeric data, integer data, or monetary data. Otherwise, returns NULL.
NUMERIC_SCALEtinyintScale of approximate numeric data, exact numeric data, integer data, or monetary data. Otherwise, returns NULL.
DATETIME_PRECISIONsmallintSubtype code for datetime and ISOinteger data types. For other data types, returns NULL.
CHARACTER_SET_CATALOGvarchar(6)Returns master. This indicates the database in which the character set is located if the column is character data or text data type. Otherwise, returns NULL.
CHARACTER_SET_SCHEMAvarchar(3)Always returns NULL.
CHARACTER_SET_NAMEnvarchar(128)Returns the unique name for the character set if this column is character data or text data type. Otherwise, returns NULL.
COLLATION_CATALOGvarchar(6)Always returns NULL.
COLLATION_SCHEMAvarchar(3)Always returns NULL.
COLLATION_NAMEnvarchar(128)Returns the unique name for the sort order if the column is character data or text data type. Otherwise, returns NULL.
DOMAIN_CATALOGnvarchar(128)If the column is an alias data type, this column is the database name in which the user-defined data type was created. Otherwise, returns NULL.
DOMAIN_SCHEMAnvarchar(128)If the column is a user-defined data type, this column is the name of the schema that contains the user-defined data type. Otherwise, returns NULL.

 ** Important ** Do not use INFORMATION_SCHEMA views to determine the schema of an object. The only reliable way to find the schema of a object is to query the sys.objects catalog view.
DOMAIN_NAMEnvarchar(128)If the column is a user-defined data type, this column is the name of the user-defined data type. Otherwise, returns NULL.

System Views (Transact-SQL)
Information Schema Views (Transact-SQL)
sys.columns (Transact-SQL)
sys.objects (Transact-SQL)

Community Additions

ADD
Show: