This topic describes the multiple statements feature supported by Distributed Relational Database Service (DRDS).
DRDS allows you to specify multiple statements in one statement string. The statements must be separated with semicolons (;).
mysql> SELECT * FROM t1; SELECT * FROM t2; SELECT NOW().
- Before you execute the preceding statement string, use the --delimiter parameter on the MySQL client to change the delimiter for SQL statements to a period (.) on the MySQL client. This prevents the client from splitting the SQL request based on semicolons (;).
- When DRDS executes the preceding SQL statement string, it splits the SQL statements based on semicolons (;) and then execute the statements in sequence.