Alter Procedure
Overview
Stored procedures are simply stored batches of pre-compiled and parameterized SQL statements. You can create, alter, drop and execute procedures.
Example
This example creates a stored procedure which performs multiple operations on the Word schema.
CREATE PROCEDURE CreateAndGetWord
(
@Word as string
) ON WordList:Word AS
(
INSERT INTO WordList:Word
(
Text = @Word,
GUID = Guid(),
LanguageId = 1
)
SELECT * FROM WordList:Word WHERE Text = @Word
DELETE FROM WordList:Word WHERE Text = @Word
)
In this example, we are simply executing the stored procedure and passing it a parameter value.
EXEC WordList:Word:CreateAndGetWord('Katzebase')
Related
- Keywords - A breakdown of all high-level statements available via the query handler.