Executes SQL statements.
Operation description
You can call this operation only for instances that are managed in Security Collaboration mode.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DbId | integer | Yes | The ID of the database. Note
This parameter is equivalent to the DatabaseId parameter in the SearchDatabase, ListDatabases, and GetDatabase operations. You can call one of these operations to obtain the required database ID. For more information, see SearchDatabase , ListDatabases , and GetDatabase .
| 123 |
Script | string | Yes | The SQL statements to be executed. Data query language (DQL) statements, data definition language (DDL) statements, and data manipulation language (DML) statements are supported. The control mode of the instance that you want to query determines whether you can execute DDL and DML statements. | select dt from report_daily |
Logic | boolean | Yes | Specifies whether the database is a logical database. | false |
Tid | long | No | The ID of the tenant. Note
To obtain the tenant ID, move the pointer over the profile picture in the upper-right corner of the Data Management (DMS) console. For more information, see Tenant information.
| 234 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "FE8EE2F1-4880-46BC-A704-5CF63EAF9A04",
"Results": [
{
"ColumnNames": [
"col1"
],
"Rows": [
[
{
"col1": "value1",
"col2": "value2"
}
]
],
"Success": true,
"Message": "UnknownError",
"RowCount": 1
}
],
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
No change history