设置multipleStatements属性为true
1 var connection = mysql.createConnection( { multipleStatements: true } ); 2 3 connection.query('select column1; select column2; select column3;', function(err, result){ 4 if(err){ 5 throw err; 6 }else{ 7 console.log(result[0]); // Column1 as a result 8 console.log(result[1]); // Column2 as a result 9 console.log(result[2]); // Column3 as a result 10 } 11 });