Created
July 14, 2019 09:42
-
-
Save TheByKotik/2bfd812062a879156bbec2f75be0cc10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS `test`; | |
USE `test`; | |
DELIMITER // | |
CREATE PROCEDURE `StoredProc`( | |
IN `Param1` INT | |
) | |
READS SQL DATA | |
SQL SECURITY INVOKER | |
BEGIN | |
SELECT `SecondInt` FROM `test` WHERE `FirstInt` = Param1; | |
END// | |
DELIMITER ; | |
CREATE TABLE IF NOT EXISTS `test` ( | |
`FirstInt` int(11) DEFAULT NULL, | |
`SecondInt` int(11) DEFAULT NULL | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
INSERT INTO `test` (`FirstInt`, `SecondInt`) VALUES | |
(1, 1), | |
(2, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment