Database Columns - List By Database
Lista databaskolumner
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns?api-version=2021-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/columns?schema={schema}&table={table}&column={column}&orderBy={orderBy}&$skiptoken={$skiptoken}&api-version=2021-11-01
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
database
|
path | True |
string |
Namnet på databasen. |
resource
|
path | True |
string |
Namnet på resursgruppen som innehåller resursen. Du kan hämta det här värdet från Azure Resource Manager-API:et eller portalen. |
server
|
path | True |
string |
Namnet på servern. |
subscription
|
path | True |
string |
Det prenumerations-ID som identifierar en Azure-prenumeration. |
api-version
|
query | True |
string |
DEN API-version som ska användas för begäran. |
$skiptoken
|
query |
string |
En täckande token som identifierar en startpunkt i samlingen. |
|
column
|
query |
string[] |
||
order
|
query |
string[] |
||
schema
|
query |
string[] |
||
table
|
query |
string[] |
Svar
Name | Typ | Description |
---|---|---|
200 OK |
Databaskolumner har hämtats. |
|
Other Status Codes |
Felsvar: ***
|
Exempel
Filter database columns |
List database columns |
Filter database columns
Exempelbegäran
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/columns?schema=dbo&table=customer&table=address&column=username&orderBy=schema asc&orderBy=table&orderBy=column desc&api-version=2021-11-01
Exempelsvar
{
"value": [
{
"properties": {
"columnType": "nvarchar",
"temporalType": "NonTemporalTable",
"memoryOptimized": false,
"isComputed": false
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/customer/columns/username",
"name": "username",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns"
}
]
}
List database columns
Exempelbegäran
Exempelsvar
{
"value": [
{
"properties": {
"columnType": "int",
"temporalType": "NonTemporalTable",
"memoryOptimized": false,
"isComputed": false
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1",
"name": "col1",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns"
},
{
"properties": {
"columnType": "bit",
"temporalType": "SystemVersionedTemporalTable",
"memoryOptimized": false,
"isComputed": false
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2",
"name": "col2",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns"
}
]
}
Definitioner
Name | Description |
---|---|
Column |
Kolumndatatypen. |
Database |
En databaskolumnresurs. |
Database |
En lista över databaskolumner. |
Table |
Tabellens temporala typ. |
ColumnDataType
Kolumndatatypen.
Name | Typ | Description |
---|---|---|
bigint |
string |
|
binary |
string |
|
bit |
string |
|
char |
string |
|
date |
string |
|
datetime |
string |
|
datetime2 |
string |
|
datetimeoffset |
string |
|
decimal |
string |
|
float |
string |
|
geography |
string |
|
geometry |
string |
|
hierarchyid |
string |
|
image |
string |
|
int |
string |
|
money |
string |
|
nchar |
string |
|
ntext |
string |
|
numeric |
string |
|
nvarchar |
string |
|
real |
string |
|
smalldatetime |
string |
|
smallint |
string |
|
smallmoney |
string |
|
sql_variant |
string |
|
sysname |
string |
|
text |
string |
|
time |
string |
|
timestamp |
string |
|
tinyint |
string |
|
uniqueidentifier |
string |
|
varbinary |
string |
|
varchar |
string |
|
xml |
string |
DatabaseColumn
En databaskolumnresurs.
Name | Typ | Description |
---|---|---|
id |
string |
Resurs-ID. |
name |
string |
Resursnamn. |
properties.columnType |
Kolumndatatypen. |
|
properties.isComputed |
boolean |
Om kolumnen beräknas eller inte. |
properties.memoryOptimized |
boolean |
Oavsett om kolumnen tillhör en minnesoptimerad tabell eller inte. |
properties.temporalType |
Tabellens temporala typ. |
|
type |
string |
Resurstyp. |
DatabaseColumnListResult
En lista över databaskolumner.
Name | Typ | Description |
---|---|---|
nextLink |
string |
Länk för att hämta nästa sida med resultat. |
value |
Matris med resultat. |
TableTemporalType
Tabellens temporala typ.
Name | Typ | Description |
---|---|---|
HistoryTable |
string |
|
NonTemporalTable |
string |
|
SystemVersionedTemporalTable |
string |