SqlAddTable



This command creates tables in a SQLite database. It comes in three different forms to allow flexibility in parameter format.
In all of the forms (n) is the database number and (table$) is the name of the table.

An automatically generated column is always added as the first column. This is the standard "_id" column.
Here is the SQLite column definition:
"_id INTEGER PRIMARY KEY AUTOINCREMENT"

SqlAddTable n, table$, col1$ {, col2$, ...}

In this form the column names are simply listed one after another.

SqlAddTable 1, "People", "FirstName", "LastName", "Age", "Sex"


SqlAddTableA n, table$, columns$()

In this form the column names are stored in an array.

Dim columns$(3) = "FirstName", "LastName", "Age", "Sex"

SqlAddTableA 1, "People", columns$()


SqlAddTableI n, table$, ItemizedCols$ {,delimiter$}

In this form the column names are stored as a delimited (Itemized) sting. The delimiter character is optional and will default to a comma if not specified.

columns$ = "FirstName,LastName,Age,Sex"

SqlAddTableI 1, "People", columns$

or

SqlAddTableI 1, "People", "FirstName-LastName-Age-Sex", "-"

Delimited Strings



SqlOpen


SqlClose


SqlDelTable


SqlInsert


SqlUpdate


SqlDelete


SqlExec


SqlGetTableNames$(n)


SQLite Cursor






Become a Patron