Database[SQLite]
ColumnNames
get names of columns in a prepared statement
Calling Sequence
Parameters
Description
Examples
Compatibility
ColumnNames( statement )
statement
-
prepared SQL statement obtained using the Prepare command
The ColumnNames command returns the names of the columns in a prepared SQL 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
ColumnNames⁡stmt
Date,USA,CHN,JPN,DEU,FRA,BRA,GBR,ITA,RUS,IND,CAN,AUS,ESP,MEX,KOR,IDN,TUR,SAU,ARG,ZAF
Fetch all rows
FetchAll⁡stmt
Finalize⁡stmt:
Close⁡connection:
The Database[SQLite][ColumnNames] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
Download Help Document
What kind of issue would you like to report? (Optional)