Sqlite Toolkit - @octave_sqlite/sqlread
- :
data =
sqlread(db, tablename)
- :
data =
sqlread(db, tablename, propertyname, propertyvalue …)
Read rows of data from a table
Return rows of data from table tablename in a sqlite database. This function is the equivalent of running SELECT * FROM table.
Inputs
- db
currently open sqlite database.
- tablename
Name of a table with the database.
- propertyname, propertyvalue
property name/value pairs where known properties are:
- MaxRows
Integer value of max number of rows in the query
- VariableNamingRule
String value ’preserve’ (default) or ’modify’ to flag renaming of variable names (currently ignored)
- RowFilter
dbrowfilter object to filter results
Outputs
- data
a table containing the query result.
Examples
Select all rows of data from a database table
# create sql connection to an existing database db = sqlite("mytest.db"); data = sqlread(db, 'TestTable');
Select 5 rows of data from a database table
# create sql connection db = sqlite("mytest.db"); data = sqlread(db, 'TestTable', "MaxRows", 5);
See also: sqlite, fetch.