DaBird
DaBird

Reputation: 3

Android multiline SQLite command

If you have a string representation of a multiline SQLite command, is there any way to execute without looping through each command. IE sqLiteDatabase.execSQL(statement)

Upvotes: 0

Views: 1059

Answers (1)

Sam
Sam

Reputation: 86948

You must call each command separately.
I assume you are just double-checking, but the execSQL() documentation is quite clear:

Parameters
sql the SQL statement to be executed. Multiple statements separated by semicolons are not supported.


The same is true for the matching rawQuery() method:

Parameters
sql the SQL query. The SQL string must not be ; terminated

Upvotes: 2

Related Questions