Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
andyFang94 opened this issue May 22, 2023 · 2 comments
Open

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

andyFang94 opened this issue May 22, 2023 · 2 comments

Comments

@andyFang94
Copy link

为什么select top 10 from table 会返回所有的数据 我的access 中有1000条数据
query 执行 select top 10 from table 会返回1000条, 有什么方式解决么?
感觉和这个有点类似 #107
@nuintun

@andyFang94
Copy link
Author

 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
Copy link
Owner

nuintun commented May 25, 2023

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

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants