Modifies the information of a table. The information includes the name of the database to which the table belongs, the name and attributes of the table, and the columns in the table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
OldDbName String Yes oldDb001

The original name of the database.

OldTableName String Yes oldTbl001

The original name of the table.

NewDbName String Yes newDb001

The new name of the database. The new name can be the same as the original name, which indicates that you do not change the name of the database.

NewTableName String Yes newTbl001

The new name of the table. The new name can be the same as the original name, which indicates that you do not change the name of the table.

Parameters Map No

The attributes of the table.

String No key001=value001

The values of table attributes.

Col Array Yes

The columns in the table.

Comment String Yes this is comment

The remarks on the columns in the table.

Name String Yes new_col1

The name of the column.

Type String Yes int

The type of the column.

Response parameters

Parameter Type Example Description
Code String NO_SUCH_OBJECT

The error code returned.

Data Boolean false

Indicates whether the information of the table is modified.

Message String No such database: bd001

The error message returned.

RequestId String 9BEAC206-0795-4DE3-B1FD-964BEF432B23

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?NewDbName=newDb001
&Col=[{"PARAM_KEY":{"Comment":"this is comment","Type":"int","Name":"new_col1"}}]
&Parameters={"key":"key001=value001"}
&OldTableName=oldTbl001
&NewTableName=newTbl001
&OldDbName=oldDb001
&<Common request parameters>

Sample success responses

XML format

<Message>No such database: bd001</Message>
<RequestId>9BEAC206-0795-4DE3-B1FD-964BEF432B23</RequestId>
<Data>false</Data>
<Code>NO_SUCH_OBJECT</Code>
<Success>true</Success>

JSON format

{
    "Message": "No such database: bd001",
    "RequestId": "9BEAC206-0795-4DE3-B1FD-964BEF432B23",
    "Data": "false",
    "Code": "NO_SUCH_OBJECT",
    "Success": "true"
}

Error codes

For a list of error codes, visit the API Error Center.