Alter Procedure

Table of Contents

Overview
Stored procedures are simply stored batches of pre-compiled and parameterized SQL statements. You can create, alter, drop and execute procedures.

Example
round-pushpin 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	
)

round-pushpin In this example, we are simply executing the stored procedure and passing it a parameter value.
EXEC WordList:Word:CreateAndGetWord('Katzebase')

Related