from a person who answered on the topic what is the store procedure.
as follows:
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)
as follows:
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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/21985024/viewspace-614115/
本文详细解释了存储过程相较于普通SQL语句的优势,包括位置、速度和复杂度等方面,并阐述了为何大多数情况下应首选使用存储过程。
753

被折叠的 条评论
为什么被折叠?



