使用参数选择TOP N在MS Access中不起作用

时间:2022-06-17 15:41:40

In SQL Server, we use this sQL for set rowcount:

在SQL Server中,我们将此sQL用于set rowcount:

SET ROWCOUNT @top

or

select top (@top) * from Table 

How to use this query in MS Access SQL?

如何在MS Access SQL中使用此查询?

1 个解决方案

#1


Access does not support using a parameter for SELECT TOP. You must write a literal value into the text of the SQL statement.

Access不支持使用SELECT TOP参数。您必须在SQL语句的文本中写入一个文字值。

#1


Access does not support using a parameter for SELECT TOP. You must write a literal value into the text of the SQL statement.

Access不支持使用SELECT TOP参数。您必须在SQL语句的文本中写入一个文字值。