这两句sql怎么合并,变成一次查询?万分感谢
var sql1 = `select title from magnet where match(title,files) against("${ key }" in natural language mode) limit ${ start },${ count };`
var sql2 = `select count(title) from magnet where match(title,files) against("${ key }" in natural language mode);`
1 回复
限制条件不一样啊。。。如果非要合并也只能 union 吧,不过这样更损耗性能了。