TARGIT InMemory supports stored procedures. Stored procedures are created with the CREATE PROCEDURE Command and dropped with DROP PROCEDURE. They are executed using the EXEC or EXECUTE commands. RETURN is used to return from a Stored Procedure.
Stored Procedures accept parameters.
Example 1 - Declaring a SP with 1 parameter and using EXEC:
CREATE PROCEDURE myProc @param1 integer as
BEGIN
SELECT * FROM ORDERS
where orderid in (@param1 )
END
EXEC myProc 10248
Or
EXEC myProc @param1=10248
Example 2 - Setting a default value to a parameter:
CREATE PROCEDURE myProc3 @param1 integer = 10250 as
BEGIN
SELECT * FROM ORDERS
where orderid in (@param1 )
END
EXEC myProc3
Comments
Please sign in to leave a comment.