Subject: stored procedures

From: Shaozhong SHI <[email-masked]>
Date: Tue, 17 Oct 2023 16:52:16 +0100

How easily turn do statement scripts into stored procedures?  Much
modification is needed?

What is the advantage to do so?

Regards,

David

---

From: "David G. Johnston" <[email-masked]>
Date: Tue, 17 Oct 2023 09:04:16 -0700

> What is the advantage to do so?

Depends on the script but possibly a matter of copy-paste for the simplest.

Advantages: The script is on the server, can require permissions, has a
name (I suppose a script file does too...).  Easier to deal with input
parameters.  Fewer components involved.  Usable by components that can't
issue SQL directly - e.g., GraphQL mutations.

Disadvantages: Changing the script is now a formal migration for the
database instead of an application update.

David J.