在 MySQL 中,我们可以在一个查询中执行多个语句,如下例所示。有没有类似的方法在 oracledb 的一个查询中运行多个语句?
const mysql = require('mysql');
const connection = mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'password',
multipleStatements: true
})
app.get('/distinct',(req,res)=>{
connection.query('select DISTINCT country FROM sample_data.olympic_winners order by country ASC; select DISTINCT sport FROM sample_data.olympic_winners order by sport ASC',(err,rows)=>{
if(!err)
res.send(rows);
else
console.log(err);
})
});