CNode

这两句sql怎么合并,变成一次查询?万分感谢

问答
NNOOZN发布于9 年前最后回复9 年前1 回复4034 浏览0 收藏
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)

O
OneNewLife#1·9 年前

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

参与回复
登录后即可参与回复。登录