gpt4 book ai didi

sql - Access 数据库 LIMIT 关键字

转载 作者:行者123 更新时间:2023-12-02 04:14:47 27 4
gpt4 key购买 nike

我试图让我的页面列表功能在带有 Access 数据库的 ASP 中工作,但我不知道 Microsoft SQL 中 LIMIT 的替代方案。我已经尝试过 TOP,但这似乎不起作用。

这是 MySQL 中使用的语句:

SELECT  * FROM customers ORDER BY customerName DESC LIMIT 0, 5

如何将其转换为与 Access 数据库一起使用?

最佳答案

根据ms-access查看:

SELECT TOP(5) * FROM customers ORDER BY customerName; 

将获取错误“SELECT 语句包含保留字”,

正确的语法是:

SELECT TOP 5 * FROM customers ORDER BY customerName; 

(注意括号)..

关于sql - Access 数据库 LIMIT 关键字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4551112/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com