Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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??

like image 485
Zankhna Avatar asked Sep 12 '25 22:09

Zankhna


1 Answers

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.

like image 135
Namphibian Avatar answered Sep 14 '25 11:09

Namphibian