nodejs获取了查询结果,但不能返回出去, 情形如下: var query = function (path,id,param,sqlWhere,res){ var aa = 111;var sql = "select * from user"; var mysql = dbHelper.getMysql(); mysql.query({ sql: sql }, function (err, rows) { res.end(JSON.stringify(rows)); aa = ro…
假设你数据库有个A表: ID NAME 1 aaa 2 bbb 3 ccc 4 ddd 需求:给你几个ID,返回A表中不存在的ID? 例如提交1,2,8,9 返回8,9 select B.id as id from dual union as id from dual union as id from dual union as id from dual ) B left join A on A.id = B.id where A.id is null;…