这两句sql怎么合并,变成一次查询?万分感谢
发布于 7 年前 作者 NOOZN 2794 次浏览 来自 问答
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 吧,不过这样更损耗性能了。

回到顶部