Sql: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(Created page with "SQL(''db'', ''sqlList'') '''Description''' The Sql statement is used to send a transaction (a list of SQL commands) to SQLite. ''Db'' is the reference returned by an SQLOPEN...")
 
No edit summary
Line 1: Line 1:
SQL(''db'', ''sqlList'')
Sql(''db'', ''sqlList'')


'''Description'''
== Description ==


The Sql statement is used to send a transaction (a list of SQL commands) to SQLite. ''Db'' is the reference returned by an SQLOPENDATABASE function. ''sqlList'' is a SQLite command or an array of SQLite commands.
The Sql statement is used to send a transaction (a list of SQL commands) to SQLite. ''Db'' is the reference returned by an SQLOpenDataBase function. ''sqlList'' is a SQLite command or an array of SQLite commands.


For more information, see Tech Note 15.
For more information, see [[Tech Note 15]].


'''Example'''
== Example ==


<pre>
<pre>
REM Sql statement sample
Rem Sql statement sample
sqlList=[]
sqlList=[]
sqlList[0]=["DROP TABLE customerData;",,skipError]
sqlList[0]=["Drop Table customerData;",,skipError]
sqlList[1]=["CREATE TABLE customerData('name', 'age', 'sales', PRIMARY KEY('name') );"]
sqlList[1]=["Create Table customerData('name', 'age', 'sales', PRIMARY KEY('name') );"]
Sql DB, sqlList
Sql DB, sqlList
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
Line 23: Line 23:
</pre>
</pre>


'''Related Items'''
== Related Items ==


[[sqlopendatabase|SQLOPENDATABASE]]
[[sqlopendatabase|SQLOPENDATABASE]]
[[Category:Language Reference]]

Revision as of 03:26, 17 August 2012

Sql(db, sqlList)

Description

The Sql statement is used to send a transaction (a list of SQL commands) to SQLite. Db is the reference returned by an SQLOpenDataBase function. sqlList is a SQLite command or an array of SQLite commands.

For more information, see Tech Note 15.

Example

Rem Sql statement sample
sqlList=[]
sqlList[0]=["Drop Table customerData;",,skipError]
sqlList[1]=["Create Table customerData('name', 'age', 'sales', PRIMARY KEY('name') );"]
Sql DB, sqlList

Output

(a table is dropped and added)

Related Items

SQLOPENDATABASE