Question: what is the difference between stored procedure and inline query?
Answer: query and stored procedure do the same thing but the difference is that a query should be compiled everytime the query is executed,while the stored procedure is in compiled form when executed first time. I f we use stored procedure we can avoid recompilation of the query.