Skip to main content

database_columns

Creates, updates, deletes, gets or lists a database_columns resource.

Overview

Namedatabase_columns
TypeResource
Idazure.sql.database_columns

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
columnTypestringThe column data type. Known values are: "image", "text", "uniqueidentifier", "date", "time", "datetime2", "datetimeoffset", "tinyint", "smallint", "int", "smalldatetime", "real", "money", "datetime", "float", "sql_variant", "ntext", "bit", "decimal", "numeric", "smallmoney", "bigint", "hierarchyid", "geometry", "geography", "varbinary", "varchar", "binary", "char", "timestamp", "nvarchar", "nchar", "xml", and "sysname". (image, text, uniqueidentifier, date, time, datetime2, datetimeoffset, tinyint, smallint, int, smalldatetime, real, money, datetime, float, sql_variant, ntext, bit, decimal, numeric, smallmoney, bigint, hierarchyid, geometry, geography, varbinary, varchar, binary, char, timestamp, nvarchar, nchar, xml, sysname)
isComputedbooleanWhether or not the column is computed.
memoryOptimizedbooleanWhether or not the column belongs to a memory optimized table.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
temporalTypestringThe table temporal type. Known values are: "NonTemporalTable", "HistoryTable", and "SystemVersionedTemporalTable". (NonTemporalTable, HistoryTable, SystemVersionedTemporalTable)
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, database_name, schema_name, table_name, column_name, subscription_idGet database column.
list_by_tableselectresource_group_name, server_name, database_name, schema_name, table_name, subscription_id$filterList database columns.
list_by_databaseselectresource_group_name, server_name, database_name, subscription_id$skiptokenList database columns.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
column_namestringThe name of the column. Required.
database_namestringThe name of the database. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
schema_namestringThe name of the schema. Required.
server_namestringThe name of the server. Required.
subscription_idstring
table_namestringThe name of the table. Required.
$filterstringAn OData filter expression that filters elements in the collection. Default value is None.
$skiptokenstringAn opaque token that identifies a starting point in the collection. Default value is None.

SELECT examples

Get database column.

SELECT
id,
name,
columnType,
isComputed,
memoryOptimized,
systemData,
temporalType,
type
FROM azure.sql.database_columns
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND table_name = '{{ table_name }}' -- required
AND column_name = '{{ column_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;