Database Columns - List By Table
列出数据库列
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns?api-version=2023-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns?$filter={$filter}&api-version=2023-08-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
database
|
path | True |
string |
数据库的名称。 |
|
resource
|
path | True |
string |
包含资源的资源组的名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
|
schema
|
path | True |
string |
架构的名称。 |
|
server
|
path | True |
string |
服务器的名称。 |
|
subscription
|
path | True |
string |
标识 Azure 订阅的订阅 ID。 |
|
table
|
path | True |
string |
表的名称。 |
|
api-version
|
query | True |
string |
要用于请求的 API 版本。 |
|
$filter
|
query |
string |
一个 OData 筛选器表达式,用于筛选集合中的元素。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
已成功检索数据库列。 |
|
| Other Status Codes |
错误响应: ***
|
示例
List database columns
示例请求
示例响应
{
"value": [
{
"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": "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/table1/columns/col2",
"name": "col2",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns",
"properties": {
"columnType": "bit",
"temporalType": "NonTemporalTable",
"memoryOptimized": false,
"isComputed": false
}
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Column |
列数据类型。 |
|
Database |
数据库列资源。 |
|
Database |
数据库列的列表。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Table |
表时态类型。 |
ColumnDataType
列数据类型。
| 值 | 说明 |
|---|---|
| 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 |
DatabaseColumn
数据库列资源。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| name |
string |
资源名称。 |
| properties.columnType |
列数据类型。 |
|
| properties.isComputed |
boolean |
是否计算列。 |
| properties.memoryOptimized |
boolean |
列是否属于内存优化表。 |
| properties.temporalType |
表时态类型。 |
|
| type |
string |
资源类型。 |
DatabaseColumnListResult
数据库列的列表。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
用于检索下一页结果的链接。 |
| value |
结果数组。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
TableTemporalType
表时态类型。
| 值 | 说明 |
|---|---|
| NonTemporalTable | |
| HistoryTable | |
| SystemVersionedTemporalTable |