Reputation: 4563
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
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