daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest May 17th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DROP FUNCTION IF EXISTS PersonName;
  2. DELIMITER |;
  3.  
  4. CREATE FUNCTION PersonName( personID SMALLINT )
  5. RETURNS CHAR(20)
  6. BEGIN
  7.   DECLARE pname CHAR(20) DEFAULT '';
  8.   SELECT name INTO pname FROM family WHERE ID=personID;
  9.   RETURN pname;
  10. END;
  11. |
  12. DELIMITER ;
  13.    
  14. ...
  15. END
  16. |
  17. DELIMITER ;
  18.    
  19. DELIMITER |;
  20.    
  21. DELIMITER |
  22.    
  23. DELIMITER ;
  24.    
  25. DROP FUNCTION IF EXISTS PersonName;
  26. DELIMITER |
  27.  
  28. CREATE FUNCTION PersonName( personID SMALLINT )
  29. RETURNS CHAR(20)
  30. BEGIN
  31.   DECLARE pname CHAR(20) DEFAULT '';
  32.   SELECT name INTO pname FROM family WHERE ID=personID;
  33.   RETURN pname;
  34. END
  35. |
  36. DELIMITER ;
  37.    
  38. DROP FUNCTION IF EXISTS PersonName;
  39. DELIMITER |
  40.  
  41. CREATE FUNCTION PersonName( personID SMALLINT )
  42. RETURNS CHAR(20)
  43. BEGIN
  44.   DECLARE pname CHAR(20) DEFAULT '';
  45.   SELECT name INTO pname FROM family WHERE ID=personID;
  46.   RETURN pname;
  47. END;
  48. |
  49. DELIMITER ; /* <-- add a space between DELIMITER and the semicolon */
  50.    
  51. DELIMITER ;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top