在 R 中,每当我将带有多个语句的查询传递给 sqlQuery 时,都会出现错误。例如,
sqlQuery(ch, 'DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2;')
产生错误
[1] "42000 1064 [MySQL][ODBC 5.1 Driver][mysqld-5.5.27]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE IF EXISTS t2' at line 1"
[2] "[RODBC] ERROR: Could not SQLExecDirect 'DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2;'"
我究竟做错了什么?