这两句sql怎么合并,变成一次查询?万分感谢
 发布于 8 年前  作者 NOOZN  3835 次预览  最后一次回复是 8 年前  来自 问答 
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 回复
OneNewLife

限制条件不一样啊。。。如果非要合并也只能 union 吧,不过这样更损耗性能了。