nuintun / node-adodb

A node.js javascript client implementing the ADODB protocol on windows.
https://nuintun.github.io/node-adodb
MIT License
185 stars 51 forks source link

为什么select top 10 from table 会返回所有的数据 #472

Open andyFang94 opened 1 year ago

andyFang94 commented 1 year ago

为什么select top 10 from table 会返回所有的数据 我的access 中有1000条数据 query 执行 select top 10 from table 会返回1000条, 有什么方式解决么? 感觉和这个有点类似 https://github.com/nuintun/node-adodb/issues/107 @nuintun

andyFang94 commented 1 year ago
 const ADODB = require("node-adodb")
 const connection = ADODB.open(`Provider=Microsoft.ACE.OLEDB.12.0;Data Source=${filePath};Jet OLEDB:Database Password=${password};`, true)
 connection .query( `SELECT TOP 10, \`column1\` FROM \`table\` ORDER BY \`column1\``)
                    .then((data) => {

})
nuintun commented 1 year ago

node-adodb 只负责中转 sql 和返回结果,出现各种查询问题一般都是 sql 不对,自行排查 sql 语句!

https://blog.51cto.com/lancelot/307180