Zankhna
Zankhna

Reputation: 4563

Stored procedure use Sqlite : Android

My query is can we write stored procedure in sqlite so that it can be accessed from my android java class?

I have refered Creating stored procedure and SQLite?

And if no then is there any other way to perform this kind of activity in android??

Upvotes: 4

Views: 5674

Answers (1)

Namphibian
Namphibian

Reputation: 12211

No you cant have a stored procedure on SQLite. It is not a multi user database server like MySQL or SQL-Server. Just create a normal query and execute it. See this link for more information How to run query in SQLite database in android?.

Remember the speed benefit of a stored procedure is that it does not have to recompile and that its query plan can be generated before execution. This is great in a multi user environment but not in a single user environment like SQLite.

Upvotes: 5

Related Questions