This topic describes the multiple statements feature supported by PolarDB-X 1.0).

PolarDB-X 1.0 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().
Note
  • 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 PolarDB-X 1.0 executes the preceding SQL statement string, it splits the SQL statements based on semicolons (;) and then execute the statements in sequence.