Stored Procedure
Stored Procedure
FULL JOIN
BENEFITS OF STORED PROCEDURES
IN
• Default mode, the caller must set the variable and the procedure can't modify it
• The procedure works on a copy
INOUT
• Combination of the two previous The caller passes the parameter in and the procedure
may modify it
EXAMPLE: INSERTION SP
DELIMITER //
CREATE PROCEDURE InsertStudent(
IN p_student_name VARCHAR(50),
IN p_contact int,
IN p_address VARCHAR(50)
)
BEGIN
INSERT INTO student (studentName, contact, address)
VALUES ( p_student_name, p_contact, p_address);
END //
DELIMITER ;
T-SQL (MICROSOFT SQL SERVER)
EXEC GetAllStudents;
USING WHERE CLAUSE
call FindProduct(3);
THE END
THANKS!