Database[SQLite]
ColumnCount
get number of columns in a prepared statement
Calling Sequence
Parameters
Description
Examples
Compatibility
ColumnCount( statement )
statement
-
prepared SQL statement obtained using the Prepare command
The ColumnCount command returns the number of columns in a prepared statement.
withDatabaseSQLite:
db≔FileToolsJoinPathkerneloptsdatadir,SQLite,G20-Population.db:
connection≔Opendb:
Select all data from table - prepare statement
stmt≔Prepareconnection,SELECT * FROM population
stmt≔SQLite statement,SELECT * FROM population
Number of columns
ColumnCountstmt
21
Fetch all rows
FetchAllstmt
Finalizestmt:
Closeconnection:
The Database[SQLite][ColumnCount] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
Download Help Document