[英]Execute Multiline sybase statement with java.sql.Statement
How can I both set rowcount and then execute a query in a Statement.executeQuery() function? 如何既设置行数又在Statement.executeQuery()函数中执行查询?
note I don't want to use Statement.setMaxRows() to do this 注意我不想使用Statement.setMaxRows()来执行此操作
Before sybase ASE 12.5.3, you need to use "set rowcount #" and then select the entries. 在sybase ASE 12.5.3之前,您需要使用“ set rowcount#”,然后选择条目。 For higher versions you can simply use the following 对于更高版本,您可以简单地使用以下命令
--Get top 10 rows.
select top 10 * from TAB_A order by my_col asc
Check your Sybase ASE version by giving 通过输入以下内容来检查您的Sybase ASE版本:
select @@version
If your version is not 12.5.4 or above, I suggest upgrading to 12.5.4. 如果您的版本不是12.5.4或更高版本,建议升级到12.5.4。 (You will just have to install an EBF) (您只需要安装EBF)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.