Help Center>
Distributed Database Middleware>
User Guide>
SQL Syntax>
Supported SQL Statements>
Specifying a Shard Using a Hint When You Execute a SQL Statement
Updated on 2023-10-09 GMT+08:00
Specifying a Shard Using a Hint When You Execute a SQL Statement
Command Format:
/*+db=<physical_db_name>*/ <your query>;
Description:
Specify a shard by configuring <physical_db_name> and execute a SQL statement on the shard.
Example:
/*+db=test_0000*/ select * from t1;
Constraints:
- The hint is valid only for SELECT, DML, and TRUNCATE statements.
- The hint works only under the text protocol, rather than the Prepare protocol.
Parent topic: Supported SQL Statements
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot