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.
with⁡DatabaseSQLite:
db≔FileToolsJoinPath⁡kernelopts⁡datadir,SQLite,G20-Population.db:
connection≔Open⁡db:
Select all data from table - prepare statement
stmt≔Prepare⁡connection,SELECT * FROM population
stmt≔SQLite statement,SELECT * FROM population
Number of columns
ColumnCount⁡stmt
21
Fetch all rows
FetchAll⁡stmt
Finalize⁡stmt:
Close⁡connection:
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