Aula 09-10-2023 - Stored Procedures
Aula 09-10-2023 - Stored Procedures
Aula 09-10-2023 - Stored Procedures
Por exemplo:
Como você já sabe, todo comando SQL deve terminar com um ";",
chamado delimiter.
https://dev.mysql.com/doc/refman/8.0/en/stored-programs-defining.html
Stored Procedures Prof. Ovídio Francisco
Stored Procedures - Delimiters
delimiter $
https://dev.mysql.com/doc/refman/8.0/en/stored-programs-defining.html
Stored Procedures Prof. Ovídio Francisco
Stored Procedures - Delimiters
Devemos então:
1. Alterar o delimitador para ”$”;
2. Criar a procedure e encerrá-la com o novo delimitador ”$”;
3. Alterar novamente o delimitador para ”;”
https://dev.mysql.com/doc/refman/8.0/en/stored-programs-defining.html
Stored Procedures Prof. Ovídio Francisco
Stored Procedures
Parâmetro de
Entrada
Seleciona o id da
marca especificada
Calcula o lucro
gera:
https://dev.mysql.com/doc/refman/8.0/en/create-procedure.html
https://medium.com/@peter.lafferty/mysql-stored-procedures-101-6b4fe230967
https://www.a2hosting.com/kb/developer-corner/mysql/mysql-stored-functions-and-pro
cedures
https://www.w3resource.com/mysql/mysql-procedure.php
https://www.paladion.net/blogs/are-stored-procedures-safe-against-sql-injection
https://dev.mysql.com/doc/refman/8.0/en/stored-programs-defining.html