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.
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
ColumnNamesstmt
Date,USA,CHN,JPN,DEU,FRA,BRA,GBR,ITA,RUS,IND,CAN,AUS,ESP,MEX,KOR,IDN,TUR,SAU,ARG,ZAF
Fetch all rows
FetchAllstmt
Finalizestmt:
Closeconnection:
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