Created
July 10, 2020 05:02
-
-
Save mikelemus27/03f643de8b08bd156df2f63276637a09 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 PROCEDURE SP_COMPARE(a INT, b INT) | |
| BEGIN | |
| DECLARE message VARCHAR(100) DEFAULT ""; | |
| IF a > b THEN | |
| SET message = CONCAT("The first parameter is greater than the second parameter.", a, ">", b); | |
| ELSEIF a < b THEN | |
| SET message = CONCAT("The first parameter is less than the second parameter.", a, "<", b); | |
| ELSE | |
| SET message = CONCAT("Values of both parameters are the same.", a, "=", b); | |
| END IF; | |
| SELECT message AS "Message"; | |
| END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment