from a person who answered on the topic what is the store procedure.
You must be talking about Stored Procedure.
Stored Procedure is SQL + something. It can be a simple SQL, and can be as complicated as a piece of program. But, no matter how simple or how complicate it is, it's functionallity is mainly serve as SQL from a user's point of view.
The main differences between SQL and Stored Procedure are:
1. Location, SQL is in your program, Stored Procedure is in database;
2. Speed, Stored Procedure is much faster, because a Stored Procedure is compiled only once as it is been called first time, not every time. On the other hand, a SQL is compiled every time when it gets called. Note, the word "compile" is applied to database side, not your program.
3. Complication, as said before, a Stored Procedure can be as simple as "SELECT * FROM MY_TABLE", but it can also do much more than that if you want it to. It can contain multiple SQLs and other transmition controls etc.
There are a lot of advantages being use Stored Procedure over SQL in your programs. You should use Stored Procedure for almost any circumstances.
Cheers,(perfect,we almost use your sincerely or sth similarity)
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/21985024/viewspace-614115/，如需转载，请注明出处，否则将追究法律责任。