Result
GetRowCount
get the number of rows in the table
Calling Sequence
Parameters
Description
Examples
result:-GetRowCount( )
result
-
Result module
GetRowCount returns the number of rows in result.
GetRowCount finds the number of rows by looking at the row index of the last row in the table. When working with very large tables and a fetchsize in place, GetRowCount may be a relatively expensive command to execute.
Create a Result.
driver≔DatabaseLoadDriver⁡:
conn≔driver:-OpenConnection⁡url,name,pass:res≔c:-ExecuteQuery⁡SELECT id FROM animals WHERE id = 1:res:-GetRowCount⁡
1
res≔c:-ExecuteQuery⁡SELECT id FROM animals WHERE id BETWEEN 1 AND 2:res:-GetRowCount⁡
2
res≔c:-ExecuteQuery⁡SELECT id FROM animals WHERE id BETWEEN 1 AND 4:res:-GetRowCount⁡
4
res≔c:-ExecuteQuery⁡SELECT id FROM animals WHERE id BETWEEN 1 AND 8:res:-GetRowCount⁡
8
res≔c:-ExecuteQuery⁡SELECT id FROM animals WHERE id = 11:res:-GetRowCount⁡
0
See Also
Database
Database[Result]
Database[Result][First]
Database[Result][GotoRow]
Database[Result][Last]
Database[Result][Next]
Database[Result][Previous]
Database[usage]
Download Help Document