Creating stored procedures and views in Synapse SQL
You can create stored procedures and views in a Synapse SQL pool using SSMS, Azure Data Studio, or Synapse Studio. In this section, we are going to learn the syntax for creating stored procedures and views. We will learn more about the usage and limitations of stored procedures and views further on in this section.
Stored procedures
A stored procedure is prepared SQL code that can be saved and reused. One important thing to keep in mind is that stored procedures are not precompiled in a Synapse SQL pool. When stored procedures are executed, SQL statements are parsed, translated, and optimized at runtime. As with SQL Server, you can pass parameters to stored procedures in a SQL pool as well.
The following code block provides a simple example of how to create stored procedures in a SQL pool:
CREATE PROCEDURE Usp_samplestoredprocedure (@MinPriceCondition MONEY, Â Â Â Â Â Â Â Â Â Â ...