SQLResultSetTake[rs,{m,n}]
reads rows m through n from a result set.
更多信息和选项
范例
基本范例
Options
"GetAsStrings"
参见
技术笔记
相关指南
DatabaseLink`
DatabaseLink`
SQLResultSetTake
SQLResultSetTake[rs,{m,n}]
reads rows m through n from a result set.
更多信息和选项
- To use SQLResultSetTake, you first need to load DatabaseLink using Needs["DatabaseLink`"].
- The following option can be given:
-
"GetAsStrings" False return the results as strings
范例
打开所有单元 关闭所有单元基本范例 (1)
Needs["DatabaseLink`"]If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the DatabaseLink`DatabaseExamples` package, as described in Using the Example Databases.
conn = OpenSQLConnection["publisher"];rs = SQLResultSetOpen[SQLSelect[conn, "roysched"]]SQLResultSetTake[rs, {2, 4}]SQLResultSetTake[rs, {-3, -1}]SQLResultSetClose[rs]CloseSQLConnection[conn];Options (1)
"GetAsStrings" (1)
Needs["DatabaseLink`"]conn = OpenSQLConnection["publisher"];rs = SQLResultSetOpen[SQLSelect[conn, "roysched"]];SQLResultSetTake[rs, {2, 4}, "GetAsStrings" -> True]//InputFormSQLResultSetClose[rs]CloseSQLConnection[conn];